commit 9112792b30c42cd46da9ca7055022fc8b4979a07 parent 38eb668d0df6532c29a2c4a7f6709507776fddfe Author: Jacob R. Edwards <jacob@jacobedwards.org> Date: Sun, 16 Apr 2023 18:26:23 -0700 Fix NULL dereference with no arguments Diffstat:
M | bmv.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bmv.c b/bmv.c @@ -258,7 +258,7 @@ main(int argc, char *argv[]) ++argv; --argc; - if (argv[0][0] != '-') { + if (!argc || argv[0][0] != '-') { flags = ""; } else { if (argv[0][1] != '-' || !argv[0][2])