diff options
author | Dan McGee <dan@archlinux.org> | 2011-09-18 23:55:23 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-09-18 23:57:26 +0200 |
commit | 52c65fdfea7d174ad2f4d895c5783d936fdac7d7 (patch) | |
tree | c96c454b093688c554de23272de6a30df3c6058d | |
parent | c12fa4ab192da0a1cd5c61b2f70e154205401e6b (diff) | |
download | pacman-52c65fdfea7d174ad2f4d895c5783d936fdac7d7.tar.gz pacman-52c65fdfea7d174ad2f4d895c5783d936fdac7d7.tar.xz |
Ensure entire struct is zeroed in _alpm_parsedate()
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r-- | lib/libalpm/util.c | 3 |
1 files changed, 2 insertions, 1 deletions
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, ""); |