0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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 #7196)
This commit is contained in:
Bram Moolenaar
2020-10-24 20:58:06 +02:00
parent e100440158
commit 67def64a4e
2 changed files with 5 additions and 0 deletions

View File

@@ -1544,6 +1544,9 @@ make_filter_cmd(
int is_fish_shell; int is_fish_shell;
char_u *shell_name = get_isolated_shell_name(); char_u *shell_name = get_isolated_shell_name();
if (shell_name == NULL)
return NULL;
// Account for fish's different syntax for subshells // Account for fish's different syntax for subshells
is_fish_shell = (fnamecmp(shell_name, "fish") == 0); is_fish_shell = (fnamecmp(shell_name, "fish") == 0);
vim_free(shell_name); vim_free(shell_name);

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1899,
/**/ /**/
1898, 1898,
/**/ /**/