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
Fix comment typo
Submitted by: sf
Reviewed by: jailletc36, minfrin, jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1824239 13f79535-47bb-0310-9956-
ffa450edef68
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) logresolve: Fix segfault with logresolve -c and IPv6
- Due to a logic error, there could be a NULL pointer dereference.
- [Stefan Fritsch]
- trunk patch: http://svn.apache.org/r1745863
- http://svn.apache.org/r1745864
- 2.4.x patch: trunk works
- +1: jailletc36, minfrin, jim
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
*/
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 = ' ';
}
}
- /* Outout the resolved name */
+ /* Output the resolved name */
apr_file_printf(outfile, "%s %s", hostname, space + 1);
/* Store it in the cache */