From: simon Date: Tue, 4 Jan 2005 17:39:35 +0000 (+0000) Subject: Don't forget to initialise ret->ai to NULL in sk_nonamelookup. Was X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/e14d27a1c47025c81e1fc62a51b0c355ec7f4957 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. git-svn-id: svn://svn.tartarus.org/sgt/putty@5064 cda61777-01e9-0310-a592-d414129be87e --- 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; }