From 5c816dc6441c82f1e0f4a1feccbc5c59c682edd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 24 Jun 2026 13:19:01 +0200 Subject: [PATCH] csi: push-title: limit title stack to 128 entries Closes #2367 --- csi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); }