From: Justin Erenkrantz Date: Tue, 18 Jun 2002 17:27:09 +0000 (+0000) Subject: It is entirely possible that dbuf is NULL. Accessing *dbuf when NULL is not X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d5237bd20528b2a4bbd94dc8d036cbfb8befcaa;p=thirdparty%2Fapache%2Fhttpd.git It is entirely possible that dbuf is NULL. Accessing *dbuf when NULL is not 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 --- diff --git a/src/modules/standard/mod_cgi.c b/src/modules/standard/mod_cgi.c index d05786eec19..c0c2307df95 100644 --- a/src/modules/standard/mod_cgi.c +++ b/src/modules/standard/mod_cgi.c @@ -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); }