]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
days should be a long type 2619/head
authorAZero13 <gfunni234@gmail.com>
Mon, 19 May 2025 17:39:32 +0000 (13:39 -0400)
committerGitHub <noreply@github.com>
Mon, 19 May 2025 17:39:32 +0000 (13:39 -0400)
The difference in years is cast to a long and then multiplied by 365. The return value of the function is also a long.

libarchive/archive_parse_date.c

index f907bf20ac60e7f448c04c54a58272c1927aed1a..cda0b11a555ff99b9af191fb50a2fb91bbde8179 100644 (file)
@@ -928,7 +928,7 @@ difftm (struct tm *a, struct tm *b)
 {
        int ay = a->tm_year + (TM_YEAR_ORIGIN - 1);
        int by = b->tm_year + (TM_YEAR_ORIGIN - 1);
-       int days = (
+       long days = (
                /* difference in day of year */
                a->tm_yday - b->tm_yday
                /* + intervening leap days */