www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David MacKenzie <...@pix.net>
Subject mod_cgi/9669: wrong error check
Date Thu, 31 Jan 2002 21:46:35 GMT

>Number:         9669
>Category:       mod_cgi
>Synopsis:       wrong error check
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Jan 31 13:50:00 PST 2002
>Originator:     djm@pix.net
>Release:        2.0.28 and CVS
Typo in error checking. After assigning to *script_in, it checks whether script_in is NULL
instead of checking *script_in, as it does for *script_out and *script_err.

--- httpd-2_0_28/modules/generators/mod_cgi.c   2002/01/31 21:38:18     1.1
+++ httpd-2_0_28/modules/generators/mod_cgi.c   2002/01/31 21:39:32
@@ -461,7 +461,7 @@
             apr_pool_note_subprocess(p, procnew, kill_after_timeout);
             *script_in = procnew->out;
-            if (!script_in)
+            if (!*script_in)
                 return APR_EBADF;
             apr_file_pipe_timeout_set(*script_in, (int)(r->server->timeout * APR_USEC_PER_SEC));
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database 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!     ]

View raw message