From: Mike Frysinger Date: Thu, 23 Mar 2017 06:31:54 +0000 (-0400) Subject: do not make DaysInMonth static X-Git-Tag: v3.3.2~38^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F892%2Fhead;p=thirdparty%2Flibarchive.git do not make DaysInMonth static Since the Feb month is written to based on arguments to this function, it makes it not safe to use simultaneously. Drop the static markings. --- diff --git a/libarchive/archive_getdate.c b/libarchive/archive_getdate.c index beb0cba2e..fe43ae820 100644 --- a/libarchive/archive_getdate.c +++ b/libarchive/archive_getdate.c @@ -691,7 +691,7 @@ Convert(time_t Month, time_t Day, time_t Year, time_t Hours, time_t Minutes, time_t Seconds, time_t Timezone, enum DSTMODE DSTmode) { - static int DaysInMonth[12] = { + int DaysInMonth[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; time_t Julian;