diff options
author | Ivan Grokhotov <ivan@espressif.com> | 2020-11-04 13:30:58 -0500 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2020-11-04 13:33:36 -0500 |
commit | b7a357e92ebb7696cfb8117e1fc838d4e93f144e (patch) | |
tree | 885f88a930e9f6e0ac4e0986c234bb9b6c9f7b74 /newlib/libc | |
parent | 5f3a301fd5b5b7bbee3d04805ef24139d616b5ea (diff) | |
download | newlib-b7a357e92ebb7696cfb8117e1fc838d4e93f144e.zip newlib-b7a357e92ebb7696cfb8117e1fc838d4e93f144e.tar.gz newlib-b7a357e92ebb7696cfb8117e1fc838d4e93f144e.tar.bz2 |
Fix 32-bit integer overflow when calculating TZ rules
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/time/tzcalc_limits.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/time/tzcalc_limits.c b/newlib/libc/time/tzcalc_limits.c index e0ea654..00044a5 100644 --- a/newlib/libc/time/tzcalc_limits.c +++ b/newlib/libc/time/tzcalc_limits.c @@ -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; } |