Closed code423n4 closed 3 years ago
shw
The setWithdrawHandler function of Controller does not check that the provided parameter _emergencyHandler is non-zero. However, a similar parameter _withdrawHandler is checked.
setWithdrawHandler
Controller
_emergencyHandler
_withdrawHandler
Referenced code: Controller.sol#L105-L110
Add require(_emergencyHandler != address(0), "setWithdrawHandler: 0x"); after line 106.
require(_emergencyHandler != address(0), "setWithdrawHandler: 0x");
Duplicate of #5
Handle
shw
Vulnerability details
Impact
The
setWithdrawHandler
function ofController
does not check that the provided parameter_emergencyHandler
is non-zero. However, a similar parameter_withdrawHandler
is checked.Proof of Concept
Referenced code: Controller.sol#L105-L110
Recommended Mitigation Steps
Add
require(_emergencyHandler != address(0), "setWithdrawHandler: 0x");
after line 106.