You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2016/05/28 10:45:18 UTC

svn commit: r1745863 - /httpd/httpd/trunk/support/logresolve.c

Author: sf
Date: Sat May 28 10:45:18 2016
New Revision: 1745863

URL: http://svn.apache.org/viewvc?rev=1745863&view=rev
Log:
Fix segfault with logresolve -c and IPv6

Due to a logic error, there could be a NULL pointer dereference.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823259

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?rev=1745863&r1=1745862&r2=1745863&view=diff
==============================================================================
--- httpd/httpd/trunk/support/logresolve.c (original)
+++ httpd/httpd/trunk/support/logresolve.c Sat May 28 10:45:18 2016
@@ -284,7 +284,7 @@ int main(int argc, const char * const ar
              */
             status = apr_sockaddr_info_get(&ipdouble, hostname, ip->family, 0,
                                            0, pline);
-            if (status == APR_SUCCESS ||
+            if (status != APR_SUCCESS ||
                 memcmp(ipdouble->ipaddr_ptr, ip->ipaddr_ptr, ip->ipaddr_len)) {
                 /* Double-lookup failed  */
                 *space = ' ';