diff options
-rw-r--r-- | src/firejail/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 900e61226..e8664e914 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -952,6 +952,12 @@ int main(int argc, char **argv) { | |||
952 | // sanitize the umask | 952 | // sanitize the umask |
953 | orig_umask = umask(022); | 953 | orig_umask = umask(022); |
954 | 954 | ||
955 | // argument count should be larger than 0 | ||
956 | if (argc == 0) { | ||
957 | fprintf(stderr, "Error: argv[0] is NULL\n"); | ||
958 | exit(1); | ||
959 | } | ||
960 | |||
955 | // check if the user is allowed to use firejail | 961 | // check if the user is allowed to use firejail |
956 | init_cfg(argc, argv); | 962 | init_cfg(argc, argv); |
957 | 963 | ||