diff --git a/src/kit/shell/src/shellLinux.c b/src/kit/shell/src/shellLinux.c index f1c578015da8b63b49883766a7116b5cde40dbf0..93783b205560604c9d25c9f5dc2e73a239a67b8e 100644 --- a/src/kit/shell/src/shellLinux.c +++ b/src/kit/shell/src/shellLinux.c @@ -108,7 +108,7 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) { arguments->is_raw_time = true; break; case 'f': - if (wordexp(arg, &full_path, 0) != 0) { + if ((0 == strlen(arg)) || (wordexp(arg, &full_path, 0) != 0)) { fprintf(stderr, "Invalid path %s\n", arg); return -1; }