]> granicus.if.org Git - apache/commitdiff
Fix segfault with logresolve -c and IPv6
authorStefan Fritsch <sf@apache.org>
Sat, 28 May 2016 10:45:18 +0000 (10:45 +0000)
committerStefan Fritsch <sf@apache.org>
Sat, 28 May 2016 10:45:18 +0000 (10:45 +0000)
Due to a logic error, there could be a NULL pointer dereference.

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

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1745863 13f79535-47bb-0310-9956-ffa450edef68

support/logresolve.c

index 71dca45243183381862bce2bf524f5faa998c55b..244b89a87f92273c934928a4c49ed93cd47812e2 100644 (file)
@@ -284,7 +284,7 @@ int main(int argc, const char * const argv[])
              */
             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 = ' ';