A zero address check is crucial in functions like changeOwner to prevent accidental or malicious assignment of critical roles, such as ownership, to an invalid address (address(0)). Although this function currently lacks access control, it should include access restrictions, making a zero address check essential to prevent ownership from being assigned to an invalid address.
If ownership is transferred to the zero address, the contract would effectively become ownerless, locking out essential functions that only the owner can execute. This could lead to permanent loss of control over the contract.
Manual code review and slither
Add zero address validation.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.