]> sourceware.org Git - newlib-cygwin.git/commitdiff
Fix 32-bit integer overflow when calculating TZ rules
authorIvan Grokhotov <ivan@espressif.com>
Wed, 4 Nov 2020 18:30:58 +0000 (13:30 -0500)
committerJeff Johnston <jjohnstn@redhat.com>
Wed, 4 Nov 2020 18:33:36 +0000 (13:33 -0500)
newlib/libc/time/tzcalc_limits.c

index e0ea6549c44bfad62215684b2a5386b6b2551187..00044a5d3c3303dfbe50f5355e3deaf9c9b653d7 100644 (file)
@@ -66,7 +66,7 @@ __tzcalc_limits (int year)
        }
 
       /* store the change-over time in GMT form by adding offset */
-      tz->__tzrule[i].change = days * SECSPERDAY +
+      tz->__tzrule[i].change = (time_t) days * SECSPERDAY +
       tz->__tzrule[i].s + tz->__tzrule[i].offset;
     }
 
This page took 0.03213 seconds and 5 git commands to generate.