From 891ba083030b4cbbf9a0e54fb298f4240d398459 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 28 Sep 1999 15:40:17 +0000 Subject: [PATCH] Fix previous commit. The standards specifically say: "The structure sigaction, used to describe an action to be taken, is defined in the header 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. --- lib/libc/net/res_send.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/net/res_send.c b/lib/libc/net/res_send.c index 15f2a13b8ffa..9cf47acc1865 100644 --- a/lib/libc/net/res_send.c +++ b/lib/libc/net/res_send.c @@ -665,6 +665,7 @@ res_send(buf, buflen, ans, anssiz) 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;