ares_getaddrinfo() missing sanity check to fix #426

pull/430/head
bradh352 3 years ago
parent ea68b1bf3d
commit 9aacffe563
  1. 5
      src/lib/ares_getaddrinfo.c

@ -560,9 +560,10 @@ static void host_callback(void *arg, int status, int timeouts,
/* at least one query ended with ARES_SUCCESS */
end_hquery(hquery, ARES_SUCCESS);
}
else if (status == ARES_ENOTFOUND || addinfostatus == ARES_ENODATA)
else if (status == ARES_ENOTFOUND || status == ARES_ENODATA ||
addinfostatus == ARES_ENODATA)
{
if (addinfostatus == ARES_ENODATA)
if (status == ARES_ENODATA || addinfostatus == ARES_ENODATA)
hquery->nodata_cnt++;
next_lookup(hquery, hquery->nodata_cnt?ARES_ENODATA:status);
}

Loading…
Cancel
Save