Closed github-actions[bot] closed 1 year ago
Breeje
medium
Not checking about the zero address before adding the address as important state variable.
Directly assigned the address passed from the constructor to state variable without any checks.
Adding zero address by mistake can result in loss.
File: src/gmx/RewardRouterController.sol 30: WETH.push(_WETH);
Link to code
File: src/gmx/RewardRouterV2Controller.sol 36: sGLP.push(_SGLP);
File: src/plutus/PLVGLPController.sol 39: sGLP.push(_SGLP); 40: PLVGLP.push(_PLVGLP);
File: src/rage/DNGMXVaultController.sol 35: vault.push(_vault);
Manual Review
Add a require statement to ensure that the address is not zero address.
require
Breeje
medium
NO ZERO ADDRESS CHECKS FOR IMPORTANT DATA
Summary
Not checking about the zero address before adding the address as important state variable.
Vulnerability Detail
Directly assigned the address passed from the constructor to state variable without any checks.
Impact
Adding zero address by mistake can result in loss.
Code Snippet
Link to code
Link to code
Link to code
Link to code
Tool used
Manual Review
Recommendation
Add a
require
statement to ensure that the address is not zero address.