aboutsummaryrefslogtreecommitdiff
path: root/csi.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2026-06-24 11:19:01 +0000
committerDaniel Eklöf <daniel@ekloef.se>2026-06-24 11:19:28 +0000
commit5c816dc6441c82f1e0f4a1feccbc5c59c682edd6 (patch)
tree11b907436a8ab595d3ea7c0b4f11d5381aa6821e /csi.c
parentcsi: XTPUSHCOLORS: limit stack depth to 128 (diff)
csi: push-title: limit title stack to 128 entries
Closes #2367
Diffstat (limited to 'csi.c')
-rw-r--r--csi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/csi.c b/csi.c
index 0593ede0..1764516c 100644
--- a/csi.c
+++ b/csi.c
@@ -1396,7 +1396,9 @@ csi_dispatch(struct terminal *term, uint8_t final)
case 22: { /* push window title */
/* 0 - icon + title, 1 - icon, 2 - title */
unsigned what = vt_param_get(term, 1, 0);
- if (what == 0 || what == 2) {
+ if ((what == 0 || what == 2) &&
+ tll_length(term->window_title_stack) < 128)
+ {
tll_push_back(
term->window_title_stack, xstrdup(term->window_title));
}