summaryrefslogtreecommitdiff
path: root/usr.sbin/cron
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2005-01-30 20:46:21 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2005-01-30 20:46:21 +0000
commitbdfd97d0af68226f324606ff683cb43aaa06e2be (patch)
tree1335e13699ebb64bb06b2fcae8b400dde8c5dc85 /usr.sbin/cron
parent199a11f81566b4be5d0949f48fb55259a636e470 (diff)
bzero s_un before use; Andrey Matveev
Diffstat (limited to 'usr.sbin/cron')
-rw-r--r--usr.sbin/cron/misc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/cron/misc.c b/usr.sbin/cron/misc.c
index 1257b01f88f..eb8695aaa0b 100644
--- a/usr.sbin/cron/misc.c
+++ b/usr.sbin/cron/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.34 2004/09/16 20:11:09 deraadt Exp $ */
+/* $OpenBSD: misc.c,v 1.35 2005/01/30 20:46:20 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -22,7 +22,7 @@
*/
#if !defined(lint) && !defined(LINT)
-static char const rcsid[] = "$OpenBSD: misc.c,v 1.34 2004/09/16 20:11:09 deraadt Exp $";
+static char const rcsid[] = "$OpenBSD: misc.c,v 1.35 2005/01/30 20:46:20 millert Exp $";
#endif
/* vix 26jan87 [RCS has the rest of the log]
@@ -734,6 +734,7 @@ open_socket(void)
"can't make socket non-blocking");
exit(ERROR_EXIT);
}
+ bzero(&s_un, sizeof(s_un));
if (snprintf(s_un.sun_path, sizeof s_un.sun_path, "%s/%s",
SPOOL_DIR, CRONSOCK) >= sizeof(s_un.sun_path)) {
fprintf(stderr, "%s/%s: path too long\n", SPOOL_DIR, CRONSOCK);
@@ -772,6 +773,7 @@ poke_daemon(const char *spool_dir, unsigned char cookie) {
(void) utime(spool_dir, NULL); /* old poke method */
+ bzero(&s_un, sizeof(s_un));
if (snprintf(s_un.sun_path, sizeof s_un.sun_path, "%s/%s",
SPOOL_DIR, CRONSOCK) >= sizeof(s_un.sun_path)) {
fprintf(stderr, "%s: %s/%s: path too long\n",