From ac46c6fdc23c0699ec53972a4082588b046559a2 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sat, 12 Nov 2011 11:57:22 +0200 Subject: [PATCH] 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. --- test/smtp-dummy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/smtp-dummy.c b/test/smtp-dummy.c index 9da8202f..1778a457 100644 --- a/test/smtp-dummy.c +++ b/test/smtp-dummy.c @@ -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;