code-423n4 / 2023-12-revolutionprotocol-findings

3 stars 2 forks source link

Use SafeMath for overflow protection #706

Closed c4-bot-6 closed 8 months ago

c4-bot-6 commented 8 months ago

Lines of code

https://github.com/code-423n4/2023-12-revolutionprotocol/blob/main/packages/revolution/src/NontransferableERC20Votes.sol#L134

Vulnerability details

Unchecked math could potentially trigger overflows.

Recommendation: Utilize SafeMath library for overflow safe operations.

using SafeMath for uint256;

function mint(address account, uint256 amount) public onlyOwner {

  // Overflow protected
  totalSupply = totalSupply.add(amount);

  // Internal logic
}

Assessed type

Under/Overflow

c4-pre-sort commented 8 months ago

raymondfam marked the issue as insufficient quality report

c4-pre-sort commented 8 months ago

raymondfam marked the issue as duplicate of #686

c4-judge commented 8 months ago

MarioPoneder marked the issue as unsatisfactory: Insufficient quality