>Number: 3307 >Category: general >Synopsis: Bug in alloc.c causes "Premature end of script headers" >Confidential: no >Severity: critical >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed Oct 28 09:50:00 PST 1998 >Last-Modified: >Originator: [EMAIL PROTECTED] >Organization: apache >Release: 1.3.3 >Environment: SCO UnixWare 7 Release 7.0.1 SCO OpenServer Release 5.0.x >Description: Please refer to (at least) PR#3250 and 3256. They were closed incorectly assuming the bug was in mod_perl or PHP 3.0.5. Its not. Compiling with those things simply exposes the problem. See below for fix. >How-To-Repeat: Compile Apache 1.3.3 with mod_perl 1.16 and PHP 3.0.5 and try to run ANY CGI bin program. It will fail. It has on both SCO Oses, and judging from the previously mentioed PR's, Linux and other OSes as well. >Fix: in main/alloc.c, in function run_child_cleanups() you call the function pointer c->child_cleanup() without checking the pointer first. Simply putting in a line before that which reads: if (c->child_cleanup) makes the problem go away.
In the function immediately above it, in run_cleanups(), you may want to put in a similar check. I dont know if the pointer should ever be able to be NULL, but putting in the safety net sure can't harm anything. If it should be impossible for the pointer to be NULL, then perhaps putting in this fix will hide a deeper problem. I dont know - I leave it up to people who know Apache internals well to make that call. >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include <[EMAIL PROTECTED]> 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! ]
