]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
do not make DaysInMonth static 892/head
authorMike Frysinger <vapier@gentoo.org>
Thu, 23 Mar 2017 06:31:54 +0000 (02:31 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 27 Mar 2017 00:23:23 +0000 (20:23 -0400)
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.

libarchive/archive_getdate.c

index beb0cba2ed3bb8c21f7cf3baf3c63dcf7df809fa..fe43ae820aeea19268fd56cf4efec7c06ee1b2ce 100644 (file)
@@ -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;