www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Kelly <John.Ke...@bellhow.com>
Subject mod_jserv/3164: Indeterminate wrapper_init return value and wrapper_parseline error.
Date Wed, 07 Oct 1998 17:59:58 GMT

>Number:         3164
>Category:       mod_jserv
>Synopsis:       Indeterminate wrapper_init return value and wrapper_parseline error.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Oct  7 11:10:01 PDT 1998
>Last-Modified:
>Originator:     John.Kelly@bellhow.com
>Organization:
apache
>Release:        1.3.2 JServ 19981007
>Environment:
Apache 1.3.2
Apache-JServ-19981007
Windows NT 4.0 Service Pack 3
Visual Studio 6.0
Sun Jre 1.1.7
>Description:
The wrapper_init function does not return a value in all cases.  If wrapper_init
executes without errors, the return value is indeterminate.  The function
does not explicitly return success.

The wrapper_parseline does not correctly replace '\n' with a NULL.  The
assignment statement is actually a conditional statement (== instead of =).
>How-To-Repeat:
Yes.
>Fix:
Following context diff.

*** c:/Temp/Apache-JServ-19981007/src/c/jserv_wrapper.c	Wed Aug 12 19:01:58 1998
--- h:/Apache-JServ-19981007/src/c/jserv_wrapper.c	Wed Oct 07 10:20:13 1998
***************
*** 69,75 ****
      int y=0,x=0;
  
      /* Remove trailing newline */
!     if (line[len-1]=='\n') line[--len]=='\0';
  
      /* Remove trailing spaces */
      x=len;
--- 69,75 ----
      int y=0,x=0;
  
      /* Remove trailing newline */
!     if (line[len-1]=='\n') line[--len] ='\0';
  
      /* Remove trailing spaces */
      x=len;
***************
*** 590,595 ****
--- 590,596 ----
          ret=wrapper_create(wrapper_data);
          if (ret!=0) return -1;
      }
+     return 0;
  }
  
  /* ========================================================================= */
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]




Mime
View raw message