summaryrefslogtreecommitdiffstats
path: root/sbin/fsdb
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-04-16 19:25:49 +0000
committerderaadt <deraadt@openbsd.org>2013-04-16 19:25:49 +0000
commit88d10243dd12bbf95332e3af9ff7a903ee306fe5 (patch)
tree60b5f67c885f86b24e4a92170571a615b3acef56 /sbin/fsdb
parentremove casts to time_t * which are not needed (diff)
downloadwireguard-openbsd-88d10243dd12bbf95332e3af9ff7a903ee306fe5.tar.xz
wireguard-openbsd-88d10243dd12bbf95332e3af9ff7a903ee306fe5.zip
bzero struct tm before use
Diffstat (limited to 'sbin/fsdb')
-rw-r--r--sbin/fsdb/fsdb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c
index 2200301819a..966d013c2d1 100644
--- a/sbin/fsdb/fsdb.c
+++ b/sbin/fsdb/fsdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsdb.c,v 1.23 2009/10/27 23:59:33 deraadt Exp $ */
+/* $OpenBSD: fsdb.c,v 1.24 2013/04/16 19:25:49 deraadt Exp $ */
/* $NetBSD: fsdb.c,v 1.7 1997/01/11 06:50:53 lukem Exp $ */
/*-
@@ -836,6 +836,7 @@ badformat:
p = name;
#define VAL() ((*p++) - '0')
+ bzero(&t, sizeof t);
t.tm_year = VAL();
t.tm_year = VAL() + t.tm_year * 10;
t.tm_year = VAL() + t.tm_year * 10;