From 6d5237bd20528b2a4bbd94dc8d036cbfb8befcaa Mon Sep 17 00:00:00 2001 From: Justin Erenkrantz Date: Tue, 18 Jun 2002 17:27:09 +0000 Subject: [PATCH] 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 --- src/modules/standard/mod_cgi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.47.2