mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 20:15:03 -05:00
verbose PASV transfers passed a bad buffer size to the name resolver functions
and it cause cause a crash. Albert Choy found and fixed it.
This commit is contained in:
parent
f73864a045
commit
5c691ed835
@ -914,7 +914,7 @@ ftp_pasv_verbose(struct connectdata *conn,
|
|||||||
answer = gethostbyaddr_r((char *) &address, sizeof(address), AF_INET,
|
answer = gethostbyaddr_r((char *) &address, sizeof(address), AF_INET,
|
||||||
(struct hostent *)bigbuf,
|
(struct hostent *)bigbuf,
|
||||||
hostent_buf + sizeof(*answer),
|
hostent_buf + sizeof(*answer),
|
||||||
sizeof(hostent_buf) - sizeof(*answer),
|
sizeof(bigbuf) - sizeof(*answer),
|
||||||
&h_errnop);
|
&h_errnop);
|
||||||
# endif
|
# endif
|
||||||
# ifdef HAVE_GETHOSTBYADDR_R_8
|
# ifdef HAVE_GETHOSTBYADDR_R_8
|
||||||
@ -922,7 +922,7 @@ ftp_pasv_verbose(struct connectdata *conn,
|
|||||||
if(gethostbyaddr_r((char *) &address, sizeof(address), AF_INET,
|
if(gethostbyaddr_r((char *) &address, sizeof(address), AF_INET,
|
||||||
(struct hostent *)hostent_buf,
|
(struct hostent *)hostent_buf,
|
||||||
hostent_buf + sizeof(*answer),
|
hostent_buf + sizeof(*answer),
|
||||||
sizeof(hostent_buf) - sizeof(*answer),
|
sizeof(bigbuf) - sizeof(*answer),
|
||||||
&answer,
|
&answer,
|
||||||
&h_errnop))
|
&h_errnop))
|
||||||
answer=NULL; /* error */
|
answer=NULL; /* error */
|
||||||
|
Loading…
Reference in New Issue
Block a user