From f5e8322e4a9bd5e5789fd81827552f2095725f59 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sun, 19 Nov 2023 12:54:22 +0100 Subject: [PATCH] frontend: Fix buffer overrun The format passed to sscanf() requested a 256-chars string, but that's excluding the terminating \0 character as the 257th character. Signed-off-by: Paul Cercueil --- frontend/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/menu.c b/frontend/menu.c index 9200e10d..413f3caf 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -217,7 +217,7 @@ static int optional_cdimg_filter(struct dirent **namelist, int count, const char *basedir) { const char *ext, *p; - char buf[256], buf2[256]; + char buf[256], buf2[257]; int i, d, ret, good_cue; struct STAT statf; FILE *f; -- 2.39.5