diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-04-16 18:28:25 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-04-16 18:28:25 +0000 |
commit | edbe4873f35dfc0b0aaada8498757b8743fa471b (patch) | |
tree | 4aa2df3c0e2303ce805d1f24dd7267bd9118be16 /usr.bin | |
parent | 506564467e28ef60074e2ec4422c6ec5bc5fd6dd (diff) |
bzero struct tm before use; ok millert
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/calendar/day.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/calendar/day.c b/usr.bin/calendar/day.c index 2187340762e..61cf2398cc0 100644 --- a/usr.bin/calendar/day.c +++ b/usr.bin/calendar/day.c @@ -1,4 +1,4 @@ -/* $OpenBSD: day.c,v 1.24 2013/04/02 04:40:21 deraadt Exp $ */ +/* $OpenBSD: day.c,v 1.25 2013/04/16 18:28:24 deraadt Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -191,6 +191,7 @@ Mktime(char *date) len = strlen(date); if (len < 2) return((time_t)-1); + bzero(&tm, sizeof tm); tm.tm_sec = 0; tm.tm_min = 0; /* Avoid getting caught by a timezone shift; set time to noon */ |