code-423n4 / 2024-04-ai-arena-mitigation-findings

0 stars 0 forks source link

H-06 MitigationConfirmed #2

Open c4-bot-7 opened 4 months ago

c4-bot-7 commented 4 months ago

Lines of code

Vulnerability details

Lines of code

Vulnerability details

C4 issue

H-06: FighterFarm:: reroll won't work for nft id greator than 255 due to input limited to uint8

Comments

The reRoll() function couldn't take token ids greater than 255, because the input type was uint8 tokenId.

Mitigation

PR #1 Now the reRoll() input type was changed to uint256 tokenId and therefore it correctly accepts any possible token id:

function reRoll(uint256 tokenId, uint8 fighterType) public {

Suggestion

None

Conclusion

LGTM

c4-judge commented 4 months ago

jhsagd76 marked the issue as satisfactory