From 8e49300cf7bd0c583d0f88c50ec3bf314c33056c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 30 Nov 2013 15:07:05 +0100 Subject: [PATCH] initialize struct tm strptime() does not initialize at least tm_isdst, which leads to an uninited value reference in mktime(). --- src/drv_imap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drv_imap.c b/src/drv_imap.c index a0013b1..43a7da0 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -824,6 +824,7 @@ parse_date( const char *str ) int hours, mins; struct tm datetime; + memset( &datetime, 0, sizeof(datetime) ); if (!(end = strptime( str, "%d-%b-%Y %H:%M:%S ", &datetime ))) return -1; if ((date = mktime( &datetime )) == -1)