Compare commits

..

2 Commits

Author SHA1 Message Date
David E. Perez Negron Rocha bcf24dfb70 Merge branch 'hotfix/Fix_Integer_Overflow/Underflow' 2020-06-19 18:57:35 -05:00
David E. Perez Negron Rocha 0b45255267 Fix Integer Overflow / Underflow 2020-06-19 18:57:01 -05:00
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);
}