Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

Default value of enum Status is not `UNKNOWN`

Summary

In the current code, the default value of the enum Status is set to NICE, instead of UNKNOWN.

Vulnerability Details

By default, every value of mapping s_theListCheckedOnce and s_theListCheckedTwice is initialized with the value NICE, rather than UNKNOWN.

Impact

This setting could lead to incorrect results in all invariant checks that utilize the Status enum.

Tools Used

Foundry

Recommendations

The initial value of the enum Status should be set to UNKNOWN. This change would ensure that any instances of Status that are not explicitly checked are correctly initialized to UNKNOWN by default.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

default status is nice

In Solidity the first element of an enum is the default value. In Santa's List, the means each person is mapped by default to 'NICE'.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.