From cc852e9a86a734bacab5363fee8e6ad2324c3f8b Mon Sep 17 00:00:00 2001 From: Bakkeby Date: Sat, 14 Feb 2026 21:09:51 +0100 Subject: [PATCH] Skip DCS escape sequences if buffer is full ref. #190 --- st.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/st.c b/st.c index 3f1fcd6..411c732 100644 --- a/st.c +++ b/st.c @@ -3466,6 +3466,11 @@ check_control_code: return; #if SIXEL_PATCH } else if (term.esc & ESC_DCS) { + /* Skip if DCS escape sequence buffer is full */ + if (csiescseq.len >= sizeof(csiescseq.buf) - 1) { + return; + } + csiescseq.buf[csiescseq.len++] = u; if (BETWEEN(u, 0x40, 0x7E) || csiescseq.len >= \