The transferAdmin function lacks a check to prevent the assignment of address(0) as the new admin. Allowing address(0) as the admin would result in an inaccessible role, effectively locking out all admin-only functions.
The ability to set address(0) as the admin poses a significant risk of accidental contract inaccessibility, potentially rendering the contract useless. Such a mistake could cause downtime or loss of control if not corrected immediately.
Manual analysis
Add a check to validate the new admin address. Implementing a condition like the following would prevent the assignment of address(0):
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.