* src/host.c (lookup_host): Fix uninitialized pointer access in c-ares code

Reported-by: Swapnil More
This commit is contained in:
Tim Rühsen 2020-06-21 11:37:25 +02:00
parent 470a7dfc84
commit e830f5f42b

View File

@ -857,8 +857,8 @@ lookup_host (const char *host, int flags)
#ifdef HAVE_LIBCARES
if (ares)
{
struct address_list *al4;
struct address_list *al6;
struct address_list *al4 = NULL;
struct address_list *al6 = NULL;
if (opt.ipv4_only || !opt.ipv6_only)
ares_gethostbyname (ares, host, AF_INET, callback, &al4);