Skip to content

Commit

Permalink
fix bug: firejail rejects empty arguments (#4395)
Browse files Browse the repository at this point in the history
  • Loading branch information
netblue30 committed Dec 21, 2021
1 parent dbe3a74 commit eba4af3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/firejail/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,10 +1013,10 @@ int main(int argc, char **argv, char **envp) {

// sanity check for arguments
for (i = 0; i < argc; i++) {
if (*argv[i] == 0) {
fprintf(stderr, "Error: too short arguments: argv[%d] is empty\n", i);
exit(1);
}
// if (*argv[i] == 0) { // see #4395 - bug reported by Debian
// fprintf(stderr, "Error: too short arguments: argv[%d] is empty\n", i);
// exit(1);
// }
if (strlen(argv[i]) >= MAX_ARG_LEN) {
fprintf(stderr, "Error: too long arguments: argv[%d] len (%zu) >= MAX_ARG_LEN (%d)\n", i, strlen(argv[i]), MAX_ARG_LEN);
exit(1);
Expand Down

0 comments on commit eba4af3

Please sign in to comment.