diff options
author | Simon Tatham <anakin@pobox.com> | 2005-01-04 20:39:35 +0300 |
---|---|---|
committer | Simon Tatham <anakin@pobox.com> | 2005-01-04 20:39:35 +0300 |
commit | e6dd93c25a94150b4de0dd59839b469c5dbd04d7 (patch) | |
tree | 43c679398d8688283e9ae9f96ca973468dd18d93 /unix | |
parent | 8053aea3606c3717ac2eb27ba2532b80284ed4c9 (diff) |
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]
Diffstat (limited to 'unix')
-rw-r--r-- | unix/uxnet.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/unix/uxnet.c b/unix/uxnet.c index f1ef98b0..5cf70082 100644 --- a/unix/uxnet.c +++ b/unix/uxnet.c @@ -209,6 +209,9 @@ SockAddr sk_nonamelookup(const char *host) ret->family = AF_UNSPEC; strncpy(ret->hostname, host, lenof(ret->hostname)); ret->hostname[lenof(ret->hostname)-1] = '\0'; +#ifndef NO_IPV6 + ret->ai = NULL; +#endif return ret; } |