From 0b4525526781b60ce048f5a6b33471d5b6827e12 Mon Sep 17 00:00:00 2001 From: "David E. Perez Negron Rocha" Date: Fri, 19 Jun 2020 18:57:01 -0500 Subject: [PATCH] Fix Integer Overflow / Underflow --- contracts/DECA.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contracts/DECA.sol b/contracts/DECA.sol index 9c3752b..cb759e8 100644 --- a/contracts/DECA.sol +++ b/contracts/DECA.sol @@ -156,6 +156,8 @@ contract DECA is ERC20, Ownable { //Add weeks in case ICO gets not enough funds function appendWeeks(uint addWeeks ) public onlyOwner { require(now >= bonus2Ends && now < endDate); + // Fix Integer Overflow / Underflow + require(endDate < (endDate + (addWeeks * 1 weeks))); // add weeks to the endDate endDate += (addWeeks * 1 weeks); }