Repository navigation
pr 12-15 T1anjiu - #16
Merged
Merged
Conversation
- Fixed incorrect 2D array cast to 1D pointer array - Changed from pointer iteration to proper 2D array indexing - Prevents setenv() crash when NULL is passed as value - Tested: program starts without crash, environment variables set correctly
- Increased buffer size from [last-data] to [last-data + 1] - from_utf8() writes null terminator after data, needs extra byte - Prevents 1-byte stack overflow when pasting UTF-8 content - Tested: buffer allocation now matches actual write size
- Changed revfg, revbg, truefg, truebg from local to static variables - Prevents undefined behavior when caller dereferences returned pointer - Eliminates compiler warning: [-Wreturn-local-addr] - Tested: compiles cleanly without warnings
- Changed boundary check from BETWEEN(x, 0, arraylen) to arraylen-1 - Prevents heap overflow when x equals arraylen (e.g., x=256) - Can be triggered remotely via OSC 4 control sequences - Tested: x=256 is now correctly rejected
Fix : Correct export_env array iteration in system.c
Fix : Prevent array overflow in xsetcolorname
Fix : Prevent stack overflow in clipboard paste
Fix : Prevent returning stack address in xdrawglyphfontspecs
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.
pointer/memory corruption fixes