Fix fuzz crashes#342
Merged
Merged
Conversation
fix chrash on divison by 0 fix chrash char boundary parse as ComplexInfinity on non-finite float input fix crash on inf Float or Approximate in calculate_appropriate_factorial fix crash on effectively infinite (as float) Exact in calculate_appropriate_factorial
Owner
|
Thanks a lot for keeping an eye open! Looks good to me, I'll merge and deploy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wanted to try out fuzzing and fuzzed factorion-lib (more specifically format, execute and parse). Found a few bugs and fixed them:
fix crash on division by 0 (any input with to be parsed containing {integer between integer_construction_limit/10 and integer_construction_limit}/0)
fix crash char boundary (any input with a non-ascii char just before a spoiler end, having a matching spoiler start previously)
parse as ComplexInfinity on non-finite float input fix crash on inf Float or Approximate in calculate_appropriate_factorial
fix crash on effectively infinite (as float) Exact in calculate_appropriate_factorial
fix overflowing negation (level i32::MIN)
Also in math (forgot to include in commit message):
fix overflowing multiplictions by 2
fix crash on negative input to approximate_termial