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

Check for (0) address in changeFeeAddress() - funds can be locked

Summary

changeFeeAddress() function does not check for the (0) address. Any withdrawal of those funds can be locked forever.

Vulnerability Details

If the owner accidentally changes the 'feeAddress' to the zero address (0x0) anybody can call the withdrawFees() function sending that ETH to the zero address where it is gone forever.

Impact

Medium - Funds can be lost but it is only by Owner oversight

Tools Used

Manual Inspection

Recommendations

Add a simple check like so (2nd line here):

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

Lead Judging Commences

Hamiltonite Lead Judge about 2 years ago
Submission Judgement Published
Invalidated
Reason: Zero address checks

Support

FAQs

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

Give us feedback!