httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: [PATCH] NULL pointer bug in CGI logging
Date Mon, 17 Feb 1997 16:29:44 GMT
+1

> I ran into this today - a NULL pointer can occur here, and isn't properly
> checked:
> 
> Index: mod_cgi.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/mod_cgi.c,v
> retrieving revision 1.32
> diff -c -r1.32 mod_cgi.c
> *** mod_cgi.c   1997/02/11 17:02:03     1.32
> --- mod_cgi.c   1997/02/17 13:20:30
> ***************
> *** 216,222 ****
>         fprintf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
>       }
>       if ((r->method_number == M_POST || r->method_number == M_PUT)
> !       && *dbuf) {
>         fprintf(f, "\n%s\n", dbuf);
>       }
> 
> --- 216,222 ----
>         fprintf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
>       }
>       if ((r->method_number == M_POST || r->method_number == M_PUT)
> !       && dbuf && *dbuf) {
>         fprintf(f, "\n%s\n", dbuf);
>       }
> 
> 
> -- 
> Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
> Freelance Consultant and  Fax:   +44 (181) 994 6472
> Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
> A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
> London, England.          Apache-SSL author




Mime
View raw message