Browse Source

initialize struct tm

strptime() does not initialize at least tm_isdst, which leads to an
uninited value reference in mktime().
wip/maildir-uid-dupes-test
Oswald Buddenhagen 11 years ago
parent
commit
8e49300cf7
  1. 1
      src/drv_imap.c

1
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)

Loading…
Cancel
Save