GivingThanks

First Flight #28
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing address(0) check

Vulnerability Details

The Solidity contract lacks a check for address(0), which means there is no verification to prevent null or uninitialized addresses from being used. This oversight could result in unintended behaviors, potential vulnerabilities, or funds being sent to an invalid address, affecting the security and reliability of the contract.

Impact

Without an address(0) check, critical functions might inadvertently accept address(0) as a valid address. This could lead to loss of funds if tokens or ETH are accidentally sent to the zero address, as they would be irretrievable.

Tools Used

Manual

Recommendations

constructor(address _registry) ERC721("DonationReceipt", "DRC") {
+ require(_registery !=address(0))
registry = CharityRegistry(msg.sender);
owner = msg.sender;
tokenCounter = 0;
}
Updates

Lead Judging Commences

n0kto Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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