Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 33502 invoked from network); 5 Mar 2007 23:50:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Mar 2007 23:50:48 -0000 Received: (qmail 23971 invoked by uid 500); 5 Mar 2007 23:50:50 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 23903 invoked by uid 500); 5 Mar 2007 23:50:49 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 23892 invoked by uid 99); 5 Mar 2007 23:50:49 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Mar 2007 15:50:49 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 05 Mar 2007 15:50:40 -0800 Received: (qmail 31838 invoked by uid 2161); 5 Mar 2007 23:50:20 -0000 Received: from [192.168.2.4] (euler.heimnetz.de [192.168.2.4]) by cerberus.heimnetz.de (Postfix on SuSE Linux 7.0 (i386)) with ESMTP id 7D7EE1721C for ; Tue, 6 Mar 2007 00:50:09 +0100 (CET) Message-ID: <45ECACBA.6000102@apache.org> Date: Tue, 06 Mar 2007 00:50:18 +0100 From: Ruediger Pluem User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417 X-Accept-Language: de, en, de-de, en-gb, cy, zu, xh MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: svn commit: r514915 - /httpd/httpd/trunk/support/logresolve.c References: <20070305232135.1DE1B1A9838@eris.apache.org> In-Reply-To: <20070305232135.1DE1B1A9838@eris.apache.org> X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org 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