projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1351fc7
)
smtp-dummy: clear sockaddr_in structure before use in bind()
author
Tomi Ollila
<tomi.ollila@iki.fi>
Sat, 12 Nov 2011 09:57:22 +0000
(11:57 +0200)
committer
David Bremner
<bremner@debian.org>
Sat, 12 Nov 2011 12:48:00 +0000
(07:48 -0500)
Any junk bytes in sockaddr_in structure before passing that
to bind() system call may cause problems.
test/smtp-dummy.c
patch
|
blob
|
history
diff --git
a/test/smtp-dummy.c
b/test/smtp-dummy.c
index 9da8202fd1ff8c0f7a9b91ff8f6490350831a5dc..1778a4577764eb08ee035a8bb8495bd96da4b541 100644
(file)
--- 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;