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:
parent
0ea6f28018
commit
72b9bb6d92
@ -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>
|
2001-04-29 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
* ftp.c (ftp_loop_internal): Don't set NO_TRUNCATE if the file is
|
* ftp.c (ftp_loop_internal): Don't set NO_TRUNCATE if the file is
|
||||||
|
@ -521,13 +521,14 @@ cmd_address (const char *com, const char *val, void *closure)
|
|||||||
struct sockaddr_in sin;
|
struct sockaddr_in sin;
|
||||||
struct sockaddr_in **target = (struct sockaddr_in **)closure;
|
struct sockaddr_in **target = (struct sockaddr_in **)closure;
|
||||||
|
|
||||||
|
memset (&sin, '\0', sizeof (sin));
|
||||||
|
|
||||||
if (!store_hostaddress ((unsigned char *)&sin.sin_addr, val))
|
if (!store_hostaddress ((unsigned char *)&sin.sin_addr, val))
|
||||||
{
|
{
|
||||||
fprintf (stderr, _("%s: %s: Cannot convert `%s' to an IP address.\n"),
|
fprintf (stderr, _("%s: %s: Cannot convert `%s' to an IP address.\n"),
|
||||||
exec_name, com, val);
|
exec_name, com, val);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sin.sin_family = AF_INET;
|
sin.sin_family = AF_INET;
|
||||||
sin.sin_port = 0;
|
sin.sin_port = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user