Remove redundant null terminator in sexpr-process.c format stringRemove redundant null terminator in sexpr-process.c format string#28
Open
preetsinghi21 wants to merge 2 commits intokovzol:masterfrom
Conversation
…ized
When elim_sen[1] != '(', the previous code would continue the loop
with no possibility of cmp becoming 1, causing an infinite loop and
hanging Aris during proof verification. Replace continue with break
since a non-parenthesized elim_sen can never match.
Fixes kovzol#25
Owner
|
Thanks for your work on this! Do you have an example (a .tle file, optimally) where the old code crashes and the new code does not? |
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.
Problem
In
src/sexpr-process.c, a format string contained a redundant\0(null terminator) embedded inside it. This is unnecessary because C
strings are already null-terminated by default. Including an explicit
\0in a format string passed to functions likeprintforfprintfcauses the string to be silently truncated at that point — anything
after it won't be printed/processed.
Fix
Removed the redundant
\0from the format string, allowing the fullstring to be processed correctly.
Impact