From 89e3eb5ada8041eb78f605728c126f1c71faba9e Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Sun, 12 Aug 2018 15:05:48 +0500 Subject: [PATCH] src/Cedar/IPsec_IKE.c: avoid unintentional integer overflow found by coverity --- src/Cedar/IPsec_IKE.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cedar/IPsec_IKE.c b/src/Cedar/IPsec_IKE.c index 9c7bc425..dfe56168 100644 --- a/src/Cedar/IPsec_IKE.c +++ b/src/Cedar/IPsec_IKE.c @@ -2792,7 +2792,7 @@ IPSECSA *NewIPsecSa(IKE_SERVER *ike, IKE_CLIENT *c, IKE_SA *ike_sa, bool initiat // Set the expiration time if (setting->LifeSeconds != 0) { - UINT64 span = (UINT64)(setting->LifeSeconds * 1000) + (UINT64)IKE_SOFT_EXPIRES_MARGIN; + UINT64 span = setting->LifeSeconds * (UINT64)1000 + (UINT64)IKE_SOFT_EXPIRES_MARGIN; sa->ExpiresHardTick = ike->Now + span; sa->ExpiresSoftTick = ike->Now + span; //sa->ExpiresSoftTick = ike->Now + (UINT64)5000;