Fix Integer Overflow / Underflow

This commit is contained in:
David E. Perez Negron Rocha 2020-06-19 18:57:01 -05:00
parent efc8046b2b
commit 0b45255267
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}