summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden Gall <aiden@aidengall.xyz>2023-12-11 19:34:27 +0000
committerAiden Gall <aiden@aidengall.xyz>2023-12-11 19:34:27 +0000
commit90da4e5dc8be70f3a5c51598d1fbbb6efd6972f6 (patch)
treee3e3092d89ea79270edf04ed1b619502db6beec4
parent7b281dc0c9b227a87bcbc696c2892ba2c5c53dc6 (diff)
check for null-byte at argv[1][0]
-rw-r--r--simplebl.c2
1 files changed, 1 insertions, 1 deletions
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 '-':