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 --- usr.bin/rlogin/rlogin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/rlogin/rlogin.c') diff --git a/usr.bin/rlogin/rlogin.c b/usr.bin/rlogin/rlogin.c index 0cb10e4576d..df6b434e04d 100644 --- a/usr.bin/rlogin/rlogin.c +++ b/usr.bin/rlogin/rlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rlogin.c,v 1.19 1998/03/25 20:22:08 art Exp $ */ +/* $OpenBSD: rlogin.c,v 1.20 1998/06/03 16:20:33 deraadt Exp $ */ /* $NetBSD: rlogin.c,v 1.8 1995/10/05 09:07:22 mycroft Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)rlogin.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: rlogin.c,v 1.19 1998/03/25 20:22:08 art Exp $"; +static char rcsid[] = "$OpenBSD: rlogin.c,v 1.20 1998/06/03 16:20:33 deraadt Exp $"; #endif #endif /* not lint */ @@ -397,6 +397,7 @@ doit(omask) * Use sigaction() instead of signal() to avoid getting SIGCHLDs * for stopped children. */ + memset(&sa, 0, sizeof sa); sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART | SA_NOCLDSTOP; sa.sa_handler = catch_child; -- cgit v1.2.3