From bbb467a2b75a608124526ad9d28b7e60187e9261 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sun, 24 Apr 2022 22:23:49 +0600 Subject: [PATCH] Don't accept a directory as config file parameter --- src/86box.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/86box.c b/src/86box.c index 720e33279..d5506c008 100644 --- a/src/86box.c +++ b/src/86box.c @@ -507,7 +507,7 @@ usage: rom_add_path(rpath); } else if (!strcasecmp(argv[c], "--config") || !strcasecmp(argv[c], "-C")) { - if ((c+1) == argc) goto usage; + if ((c+1) == argc || plat_dir_check(argv[c + 1])) goto usage; cfg = argv[++c]; } else if (!strcasecmp(argv[c], "--vmname") ||