-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Refactor parseUint
, parseInt
and parseHexUint
to check bounds
#5304
Conversation
|
I think it's easier to fix both M-02 and M-01 within the same PR. The implementation adds an extra check that Using the new private functions seemed like a good middleground IMO and we're not extending the interface |
parseUint
, parseInt
and parseHexUint
to check bounds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still some potenitally out of bound reads
- line 262: if string is sub empty (being=end), then there is no sign to read.
- line 336: similar, if string is empty, there is no prefix to check.
- line 394: similar, if string is empty, there is no prefix to check.
…penZeppelin#5304) Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
…penZeppelin#5304) Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Fixes M-01 and M-02
PR Checklist
npx changeset add
)