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