From 7c75f61be74a6a152640df01bcb60d4c07fd7e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Sat, 3 Jun 2023 13:05:33 +0200 Subject: [PATCH] Fix buffer overflow when displaying a scrolling background --- src/m_menu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/m_menu.c b/src/m_menu.c index 64a1c9404..2fc0b889f 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2807,6 +2807,7 @@ void M_SetMenuCurBackground(const char *defaultname) { char name[9]; strncpy(name, defaultname, 8); + name[8] = '\0'; M_IterateMenuTree(MIT_SetCurBackground, &name); }