frontend: Fix buffer overrun
authorPaul Cercueil <paul@crapouillou.net>
Sun, 19 Nov 2023 11:54:22 +0000 (12:54 +0100)
committernotaz <notasas@gmail.com>
Mon, 20 Nov 2023 00:50:30 +0000 (02:50 +0200)
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 <paul@crapouillou.net>
frontend/menu.c

index 9200e10..413f3ca 100644 (file)
@@ -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;