From 6ab24a2ca358e3b01ca26f6a67436f7500116cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kin=C4=8Dl?= Date: Thu, 16 May 2019 16:45:10 +0200 Subject: [PATCH] Fixed unintentional integer overflow in SetValidity. --- wolfcrypt/src/asn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 332ba7023..bdb974407 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -10415,7 +10415,7 @@ static int SetValidity(byte* output, int daysValid) afterSz = SetLength(ASN_GEN_TIME_SZ, after + 1) + 1; /* gen tag */ /* add daysValid of seconds */ - then = now + (daysValid * 86400); + then = now + (daysValid * (time_t)86400); expandedTime = XGMTIME(&then, tmpTime); if (expandedTime == NULL) { WOLFSSL_MSG("XGMTIME failed");