summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-09-28 15:40:17 +0000
committerpeter <peter@FreeBSD.org>1999-09-28 15:40:17 +0000
commit123cfe878fae616dcc63174c6db44383b7e031e0 (patch)
treeac31c231580540aad34c6c1ea9d36e6d59bafdeb
parent44711c1a0e45f0435a3a00cadbfe3e890eaf0c89 (diff)
downloadFreeBSD-src-123cfe878fae616dcc63174c6db44383b7e031e0.zip
FreeBSD-src-123cfe878fae616dcc63174c6db44383b7e031e0.tar.gz
Fix previous commit. The standards specifically say: "The structure
sigaction, used to describe an action to be taken, is defined in the header <signal.h> to include at least the following members:" ^^^^^^^^ A sigaction defined on stack with essentially random contents may have just about anything underneath fields that the program doesn't know about. It is not safe to delete the bzero.
-rw-r--r--lib/libc/net/res_send.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/net/res_send.c b/lib/libc/net/res_send.c
index 15f2a13..9cf47ac 100644
--- a/lib/libc/net/res_send.c
+++ b/lib/libc/net/res_send.c
@@ -665,6 +665,7 @@ read_len:
pfd.fd = s;
pfd.events = POLLIN;
if (use_poll == 1) {
+ bzero(&sa, sizeof(sa));
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sa.sa_handler = SIG_IGN;
OpenPOWER on IntegriCloud