From a16d4a28f40298993fc02671ae17ed7ede69d665 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 10 Oct 2015 21:33:08 +0200 Subject: [PATCH] Explicitely set tm_isdst to 0 before calling timegm. Coverity CID 12592. --- libisofs/util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libisofs/util.c b/libisofs/util.c index 786e19b..377f974 100644 --- a/libisofs/util.c +++ b/libisofs/util.c @@ -1821,6 +1821,7 @@ time_t iso_datetime_read_17(const uint8_t *buf) sscanf((char*)&buf[12], "%2d", &tm.tm_sec); tm.tm_year -= 1900; tm.tm_mon -= 1; + tm.tm_isdst = 0; return timegm(&tm) - ((int8_t)buf[6]) * 60 * 15; }