public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Fix 32-bit integer overflow when calculating TZ rules
@ 2020-11-04 18:35 Jeff Johnston
0 siblings, 0 replies; only message in thread
From: Jeff Johnston @ 2020-11-04 18:35 UTC (permalink / raw)
To: newlib-cvs
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-04 18:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 18:35 [newlib-cygwin] Fix 32-bit integer overflow when calculating TZ rules Jeff Johnston
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).