From: Paul Cercueil Date: Sun, 19 Nov 2023 11:54:22 +0000 (+0100) Subject: frontend: Fix buffer overrun X-Git-Tag: r24l~62^2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5e8322e4a9bd5e5789fd81827552f2095725f59;p=pcsx_rearmed.git 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 --- 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;