On 03/06/2007 12:21 AM, [EMAIL PROTECTED] 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
