DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: medium
Invalid

Missing check zero address isNotFrozen.

Summary

Missing check zero address

Vulnerability Details

The isNotFrozen does not validate if the provided asset address is a zero address. This oversight could potentially cause complications if a zero address is inputted into the functions utilizing this modifier.

Impact

Tools Used

Manual view

Recommendations

Adding a check for a zero address in this modifier would be a good idea to prevent potential issues and ensure the functions behave as expected in all scenarios. Here's how you could add such a check:

modifier isNotFrozen(address asset) {
require(asset != address(0), "Asset address cannot be 0");
if (s.asset[asset].frozen != F.Unfrozen) revert Errors.AssetIsFrozen();
_;
}
In this updated version of the modifier, the require statement will ensure that the asset address is not a zero address before proceeding with the rest of the checks.

Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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