fix: add buffer-length check in main.c#29
Merged
tefletch merged 1 commit intoMay 20, 2026
Conversation
Automated security fix generated by OrbisAI Security
zrax
approved these changes
May 19, 2026
Owner
|
Need to make analogous changes to GTK2 and GTK3 version-unique main.c files |
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.
Summary
Fix high severity security issue in
packages/gscope4/src/main.c.Vulnerability
V-001packages/gscope4/src/main.c:248Description: Five sprintf() calls in packages/gscope4/src/main.c write into fixed-size stack or heap buffers (ui_file, path) using ui_file_path and the HOME environment variable as inputs, without any bounds checking. Because HOME is fully attacker-controlled by any local user, setting it to a string exceeding the destination buffer size causes a stack buffer overflow when main.c:574 executes. The same pattern at lines 248, 254, 262, and 270 is exploitable if ui_file_path is influenced by environment variables or command-line arguments.
Changes
packages/gscope4/src/main.cVerification
Automated security fix by OrbisAI Security