public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Jeff Johnston <jjohnstn@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Fix 32-bit integer overflow when calculating TZ rules Date: Wed, 4 Nov 2020 18:35:19 +0000 (GMT) [thread overview] Message-ID: <20201104183519.964263857C68@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b7a357e92ebb7696cfb8117e1fc838d4e93f144e commit b7a357e92ebb7696cfb8117e1fc838d4e93f144e Author: Ivan Grokhotov <ivan@espressif.com> Date: Wed Nov 4 13:30:58 2020 -0500 Fix 32-bit integer overflow when calculating TZ rules Diff: --- newlib/libc/time/tzcalc_limits.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/time/tzcalc_limits.c b/newlib/libc/time/tzcalc_limits.c index e0ea6549c..00044a5d3 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; }
reply other threads:[~2020-11-04 18:35 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201104183519.964263857C68@sourceware.org \ --to=jjohnstn@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).