Location
Found in src/ChristmasDinner.sol [Line: 171]()
Issue
When changing the host (changeHost function), the contract directly sets host to _newHost without validating that _newHost is a non-zero address. Although the contract does require _newHost to be a participant, there is no explicit revert if _newHost is address(0).
Impact
A malicious or accidental call could set the host to the zero address, breaking subsequent logic that relies on a valid host.
Could cause confusion or potential denial of service if the host is invalid.
Recommendation
Add a check to prevent assigning address(0) as the new host:
Retain or strengthen the existing check that _newHost must be a participant to protect contract invariants.
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.