]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix segfault/SIGSEGV when running gzip from mod_mime_magic.c.
authorJeff Trawick <trawick@apache.org>
Sat, 29 Jul 2000 02:04:49 +0000 (02:04 +0000)
committerJeff Trawick <trawick@apache.org>
Sat, 29 Jul 2000 02:04:49 +0000 (02:04 +0000)
An invalid ap_proc_t was passed to ap_create_process().

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85927 13f79535-47bb-0310-9956-ffa450edef68

modules/metadata/mod_mime_magic.c

index a933f78b965f1a23bfd4bb51ce77ac6b1d24d7af..6f4257df65a3a88099ef136b08512b121b19b260 100644 (file)
@@ -2148,7 +2148,7 @@ static int uncompress_child(struct uncompress_parms *parm, ap_pool_t *cntxt,
     request_rec *r = parm->r;
     ap_pool_t *child_context = cntxt;
     ap_procattr_t *procattr;
-    ap_proc_t *procnew = NULL;
+    ap_proc_t *procnew;
     ap_iol *iol;
 
     env = ap_create_environment(child_context, r->subprocess_env);
@@ -2172,6 +2172,7 @@ static int uncompress_child(struct uncompress_parms *parm, ap_pool_t *cntxt,
             close(STDERR_FILENO);
         }
 
+        procnew = ap_pcalloc(child_context, sizeof(*procnew));
         rc = ap_create_process(procnew, compr[parm->method].argv[0],
                                new_argv, env, procattr, child_context);