Judge has assessed an item in Issue #1964 as 2 risk. The relevant finding follows:
claimFighters() function allows users to claim a pre-determined number of fighters. It does so by minting NFTs via a loop. The length of the loop is determined by the total amount of NFTs to mint. Relevant code:
uint16 totalToMint = uint16(numToMint[0] + numToMint[1]);
The potential overflow exists in this line of code. As both numToMint variables are of type uint8 if summation overflows type(uint8).max, the transaction will revert.
Judge has assessed an item in Issue #1964 as 2 risk. The relevant finding follows:
claimFighters() function allows users to claim a pre-determined number of fighters. It does so by minting NFTs via a loop. The length of the loop is determined by the total amount of NFTs to mint. Relevant code:
uint16 totalToMint = uint16(numToMint[0] + numToMint[1]); The potential overflow exists in this line of code. As both numToMint variables are of type uint8 if summation overflows type(uint8).max, the transaction will revert.