Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no check _rangeStart<=_rangeEnd #17

Open
code423n4 opened this issue May 8, 2021 · 0 comments
Open

no check _rangeStart<=_rangeEnd #17

code423n4 opened this issue May 8, 2021 · 0 comments
Labels

Comments

@code423n4
Copy link
Contributor

Handle

gpersoon

Vulnerability details

Impact

In NFTXRangeEligibility.sol a range is defined via __NFTXEligibility_init and setEligibilityPreferences.
No check is done to make sure _rangeStart<=_rangeEnd, so one could accidentally define as range that is effectively empty.

Proof of Concept

function setEligibilityPreferences(uint256 _rangeStart, uint256 _rangeEnd) externalvirtual onlyOwner {
rangeStart = _rangeStart;
rangeEnd = _rangeEnd;
emit RangeSet(_rangeStart, _rangeEnd);
}

Tools Used

Editor

Recommended Mitigation Steps

Consider adding a check to make sure _rangeStart<=_rangeEnd

@code423n4 code423n4 added 0 (Non-critical) bug Something isn't working labels May 8, 2021
code423n4 added a commit that referenced this issue May 8, 2021
@0xKiwi 0xKiwi closed this as completed May 20, 2021
@cemozerr cemozerr reopened this May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants