diff options
author | 2021-12-21 08:12:23 -0500 | |
---|---|---|
committer | 2021-12-21 08:12:23 -0500 | |
commit | eba4af3be75f58cc6d27a368dcc53fe6461de033 (patch) | |
tree | 09a2d6e97842af3d2b001ed2cd0ff16926234e87 | |
parent | update (diff) | |
download | firejail-eba4af3be75f58cc6d27a368dcc53fe6461de033.tar.gz firejail-eba4af3be75f58cc6d27a368dcc53fe6461de033.tar.zst firejail-eba4af3be75f58cc6d27a368dcc53fe6461de033.zip |
fix bug: firejail rejects empty arguments (#4395)
-rw-r--r-- | src/firejail/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 58e374b8b..e49280ab1 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -1013,10 +1013,10 @@ int main(int argc, char **argv, char **envp) { | |||
1013 | 1013 | ||
1014 | // sanity check for arguments | 1014 | // sanity check for arguments |
1015 | for (i = 0; i < argc; i++) { | 1015 | for (i = 0; i < argc; i++) { |
1016 | if (*argv[i] == 0) { | 1016 | // if (*argv[i] == 0) { // see #4395 - bug reported by Debian |
1017 | fprintf(stderr, "Error: too short arguments: argv[%d] is empty\n", i); | 1017 | // fprintf(stderr, "Error: too short arguments: argv[%d] is empty\n", i); |
1018 | exit(1); | 1018 | // exit(1); |
1019 | } | 1019 | // } |
1020 | if (strlen(argv[i]) >= MAX_ARG_LEN) { | 1020 | if (strlen(argv[i]) >= MAX_ARG_LEN) { |
1021 | fprintf(stderr, "Error: too long arguments: argv[%d] len (%zu) >= MAX_ARG_LEN (%d)\n", i, strlen(argv[i]), MAX_ARG_LEN); | 1021 | fprintf(stderr, "Error: too long arguments: argv[%d] len (%zu) >= MAX_ARG_LEN (%d)\n", i, strlen(argv[i]), MAX_ARG_LEN); |
1022 | exit(1); | 1022 | exit(1); |