diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-08-22 21:21:01 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-08-22 21:21:01 +0000 |
commit | d792937686dac6a0a5217a589d8a2ba3ec083f51 (patch) | |
tree | 7f226b7b2b8e5996bf9f8126642a2891fe2a0565 /lib | |
parent | bac66ec26ba60e371afd811214f5462ff7402789 (diff) |
Peter Sylvester pointed out a flaw in the AllowServerConnect() in the FTP
code when doing pure ipv6 EPRT connections.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftp.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -215,8 +215,12 @@ static CURLcode AllowServerConnect(struct connectdata *conn) /* we have received data here */ { curl_socket_t s = CURL_SOCKET_BAD; - socklen_t size = (socklen_t) sizeof(struct sockaddr_in); +#ifdef ENABLE_IPV6 + struct Curl_sockaddr_storage add; +#else struct sockaddr_in add; +#endif + socklen_t size = (socklen_t) sizeof(add); if(0 == getsockname(sock, (struct sockaddr *) &add, &size)) s=accept(sock, (struct sockaddr *) &add, &size); |