Closed sherlock-admin2 closed 7 months ago
Lucyan99
medium
address(0)
Assigning values to address state variables without checking for address(0).
Found in contracts/JalaFactory.sol Line: 24
feeToSetter = _feeToSetter;
Found in contracts/JalaFactory.sol Line: 61
feeTo = _feeTo;
Found in contracts/JalaFactory.sol Line: 67
Found in contracts/JalaPair.sol Line: 89
token0 = _token0;
Found in contracts/JalaPair.sol Line: 90
token1 = _token1;
Found in contracts/utils/ChilizWrappedERC20.sol Line: 23
underlyingToken = _underlyingToken;
Revert if the address is address(0).
Invalid based on sherlock rules
Zero address checks: Check to make sure input values are not zero addresses.
Lucyan99
medium
NC-1: Missing checks for
address(0)
when assigning values to address state variablesSummary
Assigning values to address state variables without checking for
address(0)
.Code Snippet
Found in contracts/JalaFactory.sol Line: 24
Found in contracts/JalaFactory.sol Line: 61
Found in contracts/JalaFactory.sol Line: 67
Found in contracts/JalaPair.sol Line: 89
Found in contracts/JalaPair.sol Line: 90
Found in contracts/utils/ChilizWrappedERC20.sol Line: 23
Recommendation
Revert if the address is
address(0)
.