You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ruediger Pluem <rp...@apache.org> on 2007/03/06 00:50:18 UTC

Re: svn commit: r514915 - /httpd/httpd/trunk/support/logresolve.c


On 03/06/2007 12:21 AM, jorton@apache.org wrote:
> Author: jorton
> Date: Mon Mar  5 15:21:31 2007
> New Revision: 514915
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=514915
> Log:
> * support/logresolve.c (main): Fix potential NULL pointer dereference,
> found by Coverity analysis tool.
> 
> Modified:
>     httpd/httpd/trunk/support/logresolve.c
> 
> Modified: httpd/httpd/trunk/support/logresolve.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/logresolve.c?view=diff&rev=514915&r1=514914&r2=514915
> ==============================================================================
> --- httpd/httpd/trunk/support/logresolve.c (original)
> +++ httpd/httpd/trunk/support/logresolve.c Mon Mar  5 15:21:31 2007
> @@ -237,7 +237,7 @@
>          if (status != APR_SUCCESS) {
>              /* Not an IP address */
>                  withname++;
> -            *space = ' ';
> +            if (space) *space = ' ';
>              apr_file_puts(line, outfile);
>              continue;
>          }

Good catch, but logresolve still seems to behave strange:

Piping a file thru it which only contains the line

127.0.0.1

results in

127.0.0.1.

Putting a trailing space behind 127.0.0.1 results in localhost.

Regards

RĂ¼diger



Re: svn commit: r514915 - /httpd/httpd/trunk/support/logresolve.c

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Mar 06, 2007 at 12:50:18AM +0100, Ruediger Pluem wrote:
> > Author: jorton
> > Date: Mon Mar  5 15:21:31 2007
> > New Revision: 514915
> > 
> > URL: http://svn.apache.org/viewvc?view=rev&rev=514915
> > Log:
> > * support/logresolve.c (main): Fix potential NULL pointer dereference,
> > found by Coverity analysis tool.
...
> Good catch, but logresolve still seems to behave strange:

Thanks, this should all be fixed now with r515565.

joe