Mercurial > vim
changeset 22701:1c31afe1f43f v8.2.1899
patch 8.2.1899: crash in out-of-memory situation
Commit: https://github.com/vim/vim/commit/67def64a4e4590a5f3b55ebfc33c42a3dcd7b559
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 24 20:58:06 2020 +0200
patch 8.2.1899: crash in out-of-memory situation
Problem: Crash in out-of-memory situation.
Solution: Bail out if shell_name is NULL. (Dominique Pell?, closes https://github.com/vim/vim/issues/7196)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 24 Oct 2020 21:00:06 +0200 |
parents | 9414f650a6b9 |
children | 81d7d3860786 |
files | src/ex_cmds.c src/version.c |
diffstat | 2 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);