From a7106d8eb26981a372ce7462d70d81a870a2a592 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 23 Oct 2022 17:43:10 +0100 Subject: [PATCH] Add missing initialisation of term->osc_strlen. An uninitialised value could have got as far as do_osc() via the relatively recent code path for early termination of an OSC before it's fully set up. --- terminal/terminal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/terminal/terminal.c b/terminal/terminal.c index ee227190..37fa3513 100644 --- a/terminal/terminal.c +++ b/terminal/terminal.c @@ -4022,6 +4022,7 @@ static void term_out(Terminal *term, bool called_from_term_data) /* Compatibility is nasty here, xterm, linux, decterm yuk! */ compatibility(OTHER); term->termstate = SEEN_OSC; + term->osc_strlen = 0; term->esc_args[0] = 0; term->esc_nargs = 1; break;