mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-10 11:35:00 -05:00
Ensure entire struct is zeroed in _alpm_parsedate()
Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
This commit is contained in:
parent
c12fa4ab19
commit
52c65fdfea
@ -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, "");
|
||||
|
Loading…
Reference in New Issue
Block a user