-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
types: make NewDecFromStr returns error for too large decimal #9157
types: make NewDecFromStr returns error for too large decimal #9157
Conversation
cc @odeke-em |
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.
LGTM, thank you @cuonglm! Fruits of the tree of continuous fuzzing :-) @alessio @marbar3778 please help take a look and also we might need backports as this can crash a node.
Codecov Report
@@ Coverage Diff @@
## master #9157 +/- ##
=======================================
Coverage 58.89% 58.89%
=======================================
Files 585 585
Lines 32801 32803 +2
=======================================
+ Hits 19318 19320 +2
Misses 11199 11199
Partials 2284 2284
|
Otherwise, NewDecFromStr may accept very large input, causing Dec methods panic, e.g Dec.TruncateInt Found by oss-fuzz: https://oss-fuzz.com/testcase-detail/6454129938530304 Fixes #9160
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.
utACK
Description
Otherwise, NewDecFromStr may accept very large input, causing Dec
methods panic, e.g Dec.TruncateInt
Found by oss-fuzz: https://oss-fuzz.com/testcase-detail/6454129938530304
Fixes #9160
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes