From 52c65fdfea7d174ad2f4d895c5783d936fdac7d7 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 18 Sep 2011 16:55:23 -0500 Subject: Ensure entire struct is zeroed in _alpm_parsedate() Signed-off-by: Dan McGee Signed-off-by: Dave Reisner --- lib/libalpm/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/util.c') diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 58274ed1..f4fecabb 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -1101,7 +1101,8 @@ time_t _alpm_parsedate(const char *line) { if(isalpha((unsigned char)line[0])) { /* initialize to null in case of failure */ - struct tm tmp_tm = { 0 }; + struct tm tmp_tm; + memset(&tmp_tm, 0, sizeof(struct tm)); setlocale(LC_TIME, "C"); strptime(line, "%a %b %e %H:%M:%S %Y", &tmp_tm); setlocale(LC_TIME, ""); -- cgit v1.2.3-24-g4f1b