Subject: ares_init.c +1295, missing else?

ares_init.c +1295, missing else?

From: Dima Tisnek <dimaqq_at_gmail.com>
Date: Fri, 11 Feb 2011 18:59:21 -0700

Hi,
it occurs to me that perhaps there's a missing "else" in ares_init.c line 1295;

without an else there, contents of "pat" that could have been
successfully set just above, may be clobbered by successive
unsuccessful calls to "xxx_pton" or "ip_addr".

if there is a guarantee that unsuccessful calls to "xxx_pton" or
"ip_addr" don't change the destination struct, the code woud make
sense in a different way, namely try ipv6, then try is same can be
understood as ipv4, but I don't see guarantees like that in the code.

d.
Received on 2011-02-12