mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49:53 +03:00
src/Cedar/IPsec_IKE.c: avoid unintentional integer overflow
found by coverity
This commit is contained in:
parent
2be6128e23
commit
89e3eb5ada
@ -2792,7 +2792,7 @@ IPSECSA *NewIPsecSa(IKE_SERVER *ike, IKE_CLIENT *c, IKE_SA *ike_sa, bool initiat
|
|||||||
// Set the expiration time
|
// Set the expiration time
|
||||||
if (setting->LifeSeconds != 0)
|
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->ExpiresHardTick = ike->Now + span;
|
||||||
sa->ExpiresSoftTick = ike->Now + span;
|
sa->ExpiresSoftTick = ike->Now + span;
|
||||||
//sa->ExpiresSoftTick = ike->Now + (UINT64)5000;
|
//sa->ExpiresSoftTick = ike->Now + (UINT64)5000;
|
||||||
|
Loading…
Reference in New Issue
Block a user