mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-20 04:28:07 -05:00
Don't forget to initialise ret->ai to NULL in sk_nonamelookup. Was
causing segfaults in IPv6-enabled Unix PuTTY connecting through a proxy when letting the proxy do the DNS. [originally from svn r5064]
This commit is contained in:
parent
8053aea360
commit
e6dd93c25a
@ -209,6 +209,9 @@ SockAddr sk_nonamelookup(const char *host)
|
|||||||
ret->family = AF_UNSPEC;
|
ret->family = AF_UNSPEC;
|
||||||
strncpy(ret->hostname, host, lenof(ret->hostname));
|
strncpy(ret->hostname, host, lenof(ret->hostname));
|
||||||
ret->hostname[lenof(ret->hostname)-1] = '\0';
|
ret->hostname[lenof(ret->hostname)-1] = '\0';
|
||||||
|
#ifndef NO_IPV6
|
||||||
|
ret->ai = NULL;
|
||||||
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user