aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-03-16 16:59:47 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-03-16 16:59:47 +0000
commit5c691ed8351eea800be412b21ad03aadfb42bacc (patch)
tree7f55dd1fb8325a5bbb05ca31769280f12817b42a
parentf73864a04504107ea59fbe8ded5970cebfb8b865 (diff)
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.
-rw-r--r--lib/ftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 7b269ef5a..4ca49a6a0 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -914,7 +914,7 @@ ftp_pasv_verbose(struct connectdata *conn,
answer = gethostbyaddr_r((char *) &address, sizeof(address), AF_INET,
(struct hostent *)bigbuf,
hostent_buf + sizeof(*answer),
- sizeof(hostent_buf) - sizeof(*answer),
+ sizeof(bigbuf) - sizeof(*answer),
&h_errnop);
# endif
# ifdef HAVE_GETHOSTBYADDR_R_8
@@ -922,7 +922,7 @@ ftp_pasv_verbose(struct connectdata *conn,
if(gethostbyaddr_r((char *) &address, sizeof(address), AF_INET,
(struct hostent *)hostent_buf,
hostent_buf + sizeof(*answer),
- sizeof(hostent_buf) - sizeof(*answer),
+ sizeof(bigbuf) - sizeof(*answer),
&answer,
&h_errnop))
answer=NULL; /* error */