mirror of
https://github.com/curl/curl.git
synced 2026-08-24 11:23:31 +03:00
Peter Sylvester pointed out a flaw in the AllowServerConnect() in the FTP
code when doing pure ipv6 EPRT connections.
This commit is contained in:
parent
bac66ec26b
commit
d792937686
3 changed files with 12 additions and 2 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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue