Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH 2/3: Don't read COLORVAR out of bounds
- X-seq: zsh-workers 54491
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH 2/3: Don't read COLORVAR out of bounds
- Date: Thu, 7 May 2026 05:59:26 +0200
- Archived-at: <https://zsh.org/workers/54491>
- List-id: <zsh-workers.zsh.org>
This could happen if a terminal replies with a bg value we don't know
about.
---
Src/Zle/termquery.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Src/Zle/termquery.c b/Src/Zle/termquery.c
index f5d5302297..9bbe226783 100644
--- a/Src/Zle/termquery.c
+++ b/Src/Zle/termquery.c
@@ -457,6 +457,8 @@ handle_color(int bg, int red, int green, int blue)
case 2: /* cursor color */
memo_cursor = (red << 24) | (green << 16) | (blue << 8);
break;
+ default: /* invalid color */
+ return;
}
colour = zalloc(8);
--
2.38.1
Messages sorted by:
Reverse Date,
Date,
Thread,
Author