The changeAdmin function in the CharityRegistry contract does not check if the provided address parameter is a valid, non-zero address before using it.
In the changeAdmin function below, the admin could unintentionally call the function with a zero address, rendering the contract unmanageable afterward.
Although the likelihood of an admin accidentally setting a zero address is low, the impact is of medium severity. This vulnerability would disrupt the intended behavior of the CharityRegistry contract, preventing any charities from being verified.
Manual Review, Slither, Aderyn, Remix
Add a zero-address check for the newAdmin parameter:
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.