From: Stefan Fritsch Date: Sat, 28 May 2016 10:45:18 +0000 (+0000) Subject: Fix segfault with logresolve -c and IPv6 X-Git-Tag: 2.5.0-alpha~1561 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d48dfdec161258870df0c2deb566f6a6602e89a4;p=thirdparty%2Fapache%2Fhttpd.git 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1745863 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/logresolve.c b/support/logresolve.c index 71dca452431..244b89a87f9 100644 --- a/support/logresolve.c +++ b/support/logresolve.c @@ -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 = ' ';