From b440821d189f4d1d114c897b632b3ea42b1baad9 Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Sun, 15 Sep 2024 02:52:48 -0400 Subject: [PATCH] osdep/terminal-win: reset tmp_buffers_key when uninit To prevent potential undefined results when using a freed value. --- osdep/terminal-win.c | 1 + 1 file changed, 1 insertion(+) diff --git a/osdep/terminal-win.c b/osdep/terminal-win.c index 1c059ff688..26565c45b0 100644 --- a/osdep/terminal-win.c +++ b/osdep/terminal-win.c @@ -285,6 +285,7 @@ void terminal_uninit(void) running = false; } FlsFree(tmp_buffers_key); + tmp_buffers_key = FLS_OUT_OF_INDEXES; } bool terminal_in_background(void)