1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-06 02:59:37 +00:00

config_sortlist: (win32) missing else

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".
This commit is contained in:
Dima Tisnek
2011-02-16 23:43:49 +01:00
committed by Daniel Stenberg
parent dec9f79d0a
commit e14f136aa3

View File

@ -1292,9 +1292,9 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
if (!sortlist_alloc(sortlist, nsort, &pat))
return ARES_ENOMEM;
}
if (ipbufpfx[0] &&
(bits = ares_inet_net_pton(AF_INET, ipbufpfx, &pat.addrV4,
sizeof(pat.addrV4))) > 0)
else if (ipbufpfx[0] &&
(bits = ares_inet_net_pton(AF_INET, ipbufpfx, &pat.addrV4,
sizeof(pat.addrV4))) > 0)
{
pat.type = PATTERN_CIDR;
pat.mask.bits = (unsigned short)bits;