[openssl] OpenSSL_1_1_1-stable update
Dr. Paul Dale
pauli at openssl.org
Wed Feb 24 22:42:38 UTC 2021
The branch OpenSSL_1_1_1-stable has been updated
via 1102187a71f6aa8f72daf46c5d543c261b90c83b (commit)
from 8df5cc3339d10f91ccb395650a83c031c2795742 (commit)
- Log -----------------------------------------------------------------
commit 1102187a71f6aa8f72daf46c5d543c261b90c83b
Author: jwalch <jeremy.walch at gmail.com>
Date: Fri Feb 19 13:02:27 2021 -0500
Fix an integer overflow in o_time.c
If input offset_sec is sufficiently large (> INT32_MAX * SECS_PER_DAY, which is possible for a long on 64-bit platforms), then the first assignment contains an overflow.
I think leaving offset_hms as an int is still safe.
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14252)
(cherry picked from commit 75de54363506e2b2480fc6baf0cd45b1f7fc8816)
-----------------------------------------------------------------------
Summary of changes:
crypto/o_time.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/o_time.c b/crypto/o_time.c
index 3502edda62..6aafd67c46 100644
--- a/crypto/o_time.c
+++ b/crypto/o_time.c
@@ -133,8 +133,8 @@ int OPENSSL_gmtime_diff(int *pday, int *psec,
static int julian_adj(const struct tm *tm, int off_day, long offset_sec,
long *pday, int *psec)
{
- int offset_hms, offset_day;
- long time_jd;
+ int offset_hms;
+ long offset_day, time_jd;
int time_year, time_month, time_day;
/* split offset into days and day seconds */
offset_day = offset_sec / SECS_PER_DAY;
More information about the openssl-commits
mailing list