4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-02 04:20:28 +08:00

Fix 32-bit integer overflow when calculating TZ rules

This commit is contained in:
Ivan Grokhotov 2020-11-04 13:30:58 -05:00 committed by Ken Brown
parent 903cf7af11
commit 0fa86823a0

View 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;
}