The issue involves the assignment of values to address state variables without preceding checks to ensure that the assigned value isn't address(0x0)
. This can lead to unexpected behavior, especially considering that address(0x0)
typically represents an uninitialized address.
In the Adminable.sol
contract, the admin
state variable is assigned a new value without checking if the new value is address(0x0)
.
Assigning address(0x0)
to an address state variable without proper checks can lead to unexpected behavior. It may cause the contract to interact with an unintended contract or result in unforeseen logic execution.
Manual code review
Implement Check for address(0x0)
: Before assigning a new value to an address state variable, include a check to ensure that the new value is not address(0x0)
. This helps prevent unintended consequences and ensures that the contract behaves as expected.
Example:
https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity
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.