Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: medium
Invalid

Miss check `address(0)` in function `changeFeeAddress`

Summary

Miss check address(0) in function changeFeeAddress

Vulnerability Details

Miss check address(0) in function changeFeeAddress

Impact

This missing check can cause: if the owner passes the address(0) to be the feeAddress can lead to the loss in fee earned from the player because sent to address(0)

Tools Used

Manual
Foundry

Recommendations

function changeFeeAddress(address newFeeAddress) external onlyOwner {
+ require(newFeeAddress!=address(0),"PuppyRaffle: not allow address(0)");
feeAddress = newFeeAddress;
emit FeeAddressChanged(newFeeAddress);
}
Updates

Lead Judging Commences

Hamiltonite Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Zero address checks

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.