]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
It is entirely possible that dbuf is NULL. Accessing *dbuf when NULL is not
authorJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 18 Jun 2002 17:27:09 +0000 (17:27 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 18 Jun 2002 17:27:09 +0000 (17:27 +0000)
a good idea.

(How this escaped for essentially 5 years is completely unknown)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@95776 13f79535-47bb-0310-9956-ffa450edef68

src/modules/standard/mod_cgi.c

index d05786eec194978165e9b6538308244030fc3f87..c0c2307df958558094f133214b1143dc97312c08 100644 (file)
@@ -240,7 +240,7 @@ static int log_script(request_rec *r, cgi_server_conf * conf, int ret,
        fprintf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
     }
     if ((r->method_number == M_POST || r->method_number == M_PUT)
-       && *dbuf) {
+       && dbuf && *dbuf) {
        fprintf(f, "\n%s\n", dbuf);
     }