bugConcurrent Versions System - Bugs: bug #38729, Problem in buffer.c if...

 
 

bug #38729: Problem in buffer.c if configuration not SHUTDOWN_SERVER and START_RSH_WITH_POPEN_RW is set.

Submitted by:  Flávio Medeiros <flaviommedeiros>
Submitted on:  Sat 13 Apr 2013 02:30:22 PM UTC  
 
Category: Bug Fix (patch attached)Severity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenRelease: 
Fixed Release: NoneFixed Feature Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 13 Apr 2013 02:30:22 PM UTC, original submission:

There is a problem in buffer.c (we saw it from version 1.11.17 to 1.11.23) if configuration not SHUTDOWN_SERVER and START_RSH_WITH_POPEN_RW is set. We will get an ELSE IF statement without an IF statement, which is not a valid construction according to the C grammar (function: stdio_buffer_shutdown). The original code is shown bellow and we sent a file attached (buffer-modified-flaviomedeiros.c) with the correction. This problem has not been submitted before.

if (buf->input) {

# ifdef SHUTDOWN_SERVER
if (current_parsed_root->method != server_method)
# endif

# ifndef NO_SOCKET_TO_FD
{
/* shutdown() sockets */
if (S_ISSOCK (s.st_mode))
shutdown (fileno (bc->fp), 0);
}
# endif /* NO_SOCKET_TO_FD */

# ifdef START_RSH_WITH_POPEN_RW
/* Can't be set with SHUTDOWN_SERVER defined */
else if (pclose (bc->fp) == EOF)
{
error (1, errno, "closing connection to %s",
current_parsed_root->hostname);
closefp = 0;
}
# endif /* START_RSH_WITH_POPEN_RW */

}

Flávio Medeiros <flaviommedeiros>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #27860:  buffer-modified-flaviomedeiros.c added by flaviommedeiros (43KiB - application/octet-stream - The file (buffer-modified-flaviomedeiros.c) corrects the problem of buffer.c mentioned.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by flaviommedeiros (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 13 Apr 2013 02:30:22 PM UTCflaviommedeirosAttached File-=>Added buffer-modified-flaviomedeiros.c, #27860

    Back to the top


    Powered by Savane 3.1-cleanup1