Constructing color codes using snprintf for memory safety #21
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.
Summary: Running the
choose
binary terminates in a SIGILL (illegal instruction). I'm hoping this change keeps that from happening!I originally experienced this when looking at Homebrew/homebrew-core#59669. I have some more notes on how I arrived at this point, if anyone is interested. But I'll leave out the boring details, and stick to the relevant points. I'd be happy to answer any questions if I can.
Reproducing the error
These are the steps I took on the default branch. When I do them with applied changes, I see the expected output.
Build from source:
Run the executable. Actual output:
Expected output:
System Software Overview
Versions: