setTrustee lacks a validation check to ensure that the trustee address provided is not a zero address
Summary
setTrustee lacks a validation check to ensure that the trustee address provided is not a zero address
Vulnerability Detail
setTrustee lacks a validation check to ensure that the trustee address provided is not a zero address
Impact
Setting _trustee to a zero address can potentially cause functional issues within other parts of the contract if _trustee is expected to be a valid, operational wallet or contract address. Functions relying on _trustee being non-zero may fail or behave unexpectedly, leading to disruptions in the operation of the smart contract or even security vulnerabilities depending on the contract's design.
Mammoth Amethyst Perch
Low/Info
setTrustee
lacks a validation check to ensure that thetrustee
address provided is not a zero addressSummary
setTrustee
lacks a validation check to ensure that thetrustee
address provided is not a zero addressVulnerability Detail
setTrustee
lacks a validation check to ensure that thetrustee
address provided is not a zero addressImpact
Setting
_trustee
to a zero address can potentially cause functional issues within other parts of the contract if_trustee
is expected to be a valid, operational wallet or contract address. Functions relying on_trustee
being non-zero may fail or behave unexpectedly, leading to disruptions in the operation of the smart contract or even security vulnerabilities depending on the contract's design.Code Snippet
https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/MasterchefV2.sol#L419-L423
Tool used
Manual Review
Recommendation
ensure that the
trustee
argument is not the zero address.