From 90da4e5dc8be70f3a5c51598d1fbbb6efd6972f6 Mon Sep 17 00:00:00 2001 From: Aiden Gall Date: Mon, 11 Dec 2023 19:34:27 +0000 Subject: check for null-byte at argv[1][0] --- simplebl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simplebl.c b/simplebl.c index b1fd622..f4d81ea 100644 --- a/simplebl.c +++ b/simplebl.c @@ -178,7 +178,7 @@ main(int argc, char *argv[]) val = strtonum(argv[2], 0, LONG_MAX/2); - if (argv[1][1]) + if (!argv[1][0] || argv[1][1]) goto invalid_mode; switch (argv[1][0]) { case '-': -- cgit v1.2.3