Skip to content

fix: prevent panic on malformed xterm color responses - #207

Open
SAY-5 wants to merge 1 commit into
muesli:masterfrom
SAY-5:fix-xtermcolor-panic
Open

fix: prevent panic on malformed xterm color responses#207
SAY-5 wants to merge 1 commit into
muesli:masterfrom
SAY-5:fix-xtermcolor-panic

Conversation

@SAY-5

@SAY-5 SAY-5 commented May 12, 2026

Copy link
Copy Markdown

xTermColor indexed into the slash-split RGB components without checking their count or length, so a garbled OSC 10/11 response (e.g. from concurrent terminal writes) triggers index out of range at color.go:139. This validates the components before slicing and returns ErrInvalidColor instead. Closes #144

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.

Panic - Index out of range

1 participant