Skip to content

Fix : Prevent array overflow in xsetcolorname - #13

Open
T1anjiu wants to merge 1 commit into
michael105:masterfrom
T1anjiu:fix/p1-1-colors-overflow
Open

Fix : Prevent array overflow in xsetcolorname#13
T1anjiu wants to merge 1 commit into
michael105:masterfrom
T1anjiu:fix/p1-1-colors-overflow

Conversation

@T1anjiu

@T1anjiu T1anjiu commented Jul 29, 2026

Copy link
Copy Markdown
  • 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

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant