mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 13:14:29 -08:00
fix segfault when line only contains newline
This commit is contained in:
@@ -134,6 +134,12 @@ _execute_shell_command(mfshell_t *mfshell,char *command)
|
||||
// FIXME: handle non-zero return value of wordexp
|
||||
retval = wordexp(command, &p, WRDE_SHOWERR | WRDE_UNDEF);
|
||||
|
||||
if (p.we_wordc < 1)
|
||||
return 0;
|
||||
|
||||
if (p.we_wordv[0] == NULL)
|
||||
return 0;
|
||||
|
||||
// TODO: handle retval
|
||||
retval = _execute(mfshell, p.we_wordc, p.we_wordv);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user