1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Bug 997: Fix unlikely stack corruption in get_pasv_socket.

It is unlikely because the standard members of struct sockaddr_in
(sin_family, sin_port, sin_addr) already require at least 8 bytes
and I don't know of any system that has size_t larger than that.
Besides, at least glibc pads the structure to 16 bytes.
This commit is contained in:
Kalle Olavi Niemitalo 2008-01-22 00:22:13 +02:00 committed by Kalle Olavi Niemitalo
parent 0c1b52637f
commit e5922e4fe1
2 changed files with 3 additions and 2 deletions

1
NEWS
View File

@ -309,6 +309,7 @@ To be released as 0.11.4.
* minor bug 928: properly display no-break spaces in a UTF-8 document
if the terminal uses some other charset
* trivial bug 947: document.html.wrap_nbsp also affects text in tables
* trivial bug 997: fix unlikely stack corruption in active FTP
* build bug 950: fix ``config/install-sh: No such file or directory''
on SunOS
* build bug 936: fix errors about undefined off_t (autoheader

View File

@ -299,8 +299,8 @@ get_pasv_socket(struct socket *ctrl_socket, struct sockaddr_storage *addr)
syspf = PF_INET;
}
memset(pasv_addr, 0, sizeof(addrlen));
memset(bind_addr, 0, sizeof(addrlen));
memset(pasv_addr, 0, addrlen);
memset(bind_addr, 0, addrlen);
/* Get our endpoint of the control socket */
len = addrlen;