smtp-dummy: clear sockaddr_in structure before use in bind()

Any junk bytes in sockaddr_in structure before passing that
to bind() system call may cause problems.
This commit is contained in:
Tomi Ollila 2011-11-12 11:57:22 +02:00 committed by David Bremner
parent 1351fc7384
commit ac46c6fdc2

View file

@ -159,6 +159,7 @@ main (int argc, char *argv[])
return 1;
}
memset (&addr, 0, sizeof (addr));
addr.sin_family = AF_INET;
addr.sin_port = htons (25025);
addr.sin_addr = *(struct in_addr *) hostinfo->h_addr;