1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Zero out SIN before using it.

Published in <sxs3daq8zdg.fsf@florida.arsdigita.de>.
This commit is contained in:
hniksic 2001-04-30 03:19:41 -07:00
parent 0ea6f28018
commit 72b9bb6d92
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2001-04-30 Hrvoje Niksic <hniksic@arsdigita.com>
* init.c (cmd_address): Zero SIN before using it; apparently
needed on *BSD.
2001-04-29 Hrvoje Niksic <hniksic@arsdigita.com>
* ftp.c (ftp_loop_internal): Don't set NO_TRUNCATE if the file is

View File

@ -521,13 +521,14 @@ cmd_address (const char *com, const char *val, void *closure)
struct sockaddr_in sin;
struct sockaddr_in **target = (struct sockaddr_in **)closure;
memset (&sin, '\0', sizeof (sin));
if (!store_hostaddress ((unsigned char *)&sin.sin_addr, val))
{
fprintf (stderr, _("%s: %s: Cannot convert `%s' to an IP address.\n"),
exec_name, com, val);
return 0;
}
sin.sin_family = AF_INET;
sin.sin_port = 0;