Fixed a memory leak in the FTP code and an off-by-one heap buffer overflow.
This commit is contained in:
parent
66f5baa16e
commit
0dec3e5e6a
3
CHANGES
3
CHANGES
@ -6,6 +6,9 @@
|
||||
|
||||
Changelog
|
||||
|
||||
Daniel Fandrich (10 Aug 2009)
|
||||
- Fixed a memory leak in the FTP code and an off-by-one heap buffer overflow.
|
||||
|
||||
Daniel Fandrich (9 Aug 2009)
|
||||
- Fixed some memory leaks in the command-line tool that caused most of the
|
||||
torture tests to fail.
|
||||
|
@ -926,9 +926,9 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
|
||||
char *port_start = NULL;
|
||||
char *port_sep = NULL;
|
||||
|
||||
addr = malloc(addrlen);
|
||||
memset(addr, 0, addrlen);
|
||||
|
||||
addr = calloc(addrlen+1, 1);
|
||||
if (!addr)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
#ifdef ENABLE_IPV6
|
||||
if(*string_ftpport == '[') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user