diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-10-24 20:58:06 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-10-24 20:58:06 +0200 |
commit | 67def64a4e4590a5f3b55ebfc33c42a3dcd7b559 (patch) | |
tree | 7634874c79fbda7565b67dc8c76de94c692c8902 /src/ex_cmds.c | |
parent | e10044015841711b989f9a898d427bcc1fdb4c32 (diff) | |
download | vim-git-67def64a4e4590a5f3b55ebfc33c42a3dcd7b559.tar.gz |
patch 8.2.1899: crash in out-of-memory situationv8.2.1899
Problem: Crash in out-of-memory situation.
Solution: Bail out if shell_name is NULL. (Dominique Pellé, closes #7196)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 1dbd01494..82e9c577a 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -1544,6 +1544,9 @@ make_filter_cmd( int is_fish_shell; char_u *shell_name = get_isolated_shell_name(); + if (shell_name == NULL) + return NULL; + // Account for fish's different syntax for subshells is_fish_shell = (fnamecmp(shell_name, "fish") == 0); vim_free(shell_name); |