From 9d478a6659b96a8538eced63153c2b979d72a29d Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 3 Jun 1998 16:20:39 +0000 Subject: zero sigaction before use --- lib/libc/gen/signal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libc') diff --git a/lib/libc/gen/signal.c b/lib/libc/gen/signal.c index 7a501d3748d..a6a2b8b8403 100644 --- a/lib/libc/gen/signal.c +++ b/lib/libc/gen/signal.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: signal.c,v 1.2 1996/08/19 08:26:09 tholo Exp $"; +static char rcsid[] = "$OpenBSD: signal.c,v 1.3 1998/06/03 16:20:22 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -49,6 +49,7 @@ signal(s, a) { struct sigaction sa, osa; + memset(&sa, 0, sizeof sa); sa.sa_handler = a; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; -- cgit v1.2.3