]> granicus.if.org Git - vim/commitdiff
patch 8.2.1899: crash in out-of-memory situation v8.2.1899
authorBram Moolenaar <Bram@vim.org>
Sat, 24 Oct 2020 18:58:06 +0000 (20:58 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 24 Oct 2020 18:58:06 +0000 (20:58 +0200)
Problem:    Crash in out-of-memory situation.
Solution:   Bail out if shell_name is NULL. (Dominique PellĂ©, closes #7196)

src/ex_cmds.c
src/version.c

index 1dbd01494eef4aabc0c7c5daea9b6f8701aba45d..82e9c577af9a1f31127dc07a81142eff1a6d2cf2 100644 (file)
@@ -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);
index ba9c8162b7a89ec4681d7c9bf98f8c186c0832e4..b4c658255637a6e2ffa43e3f8d20ea20fdb99418 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1899,
 /**/
     1898,
 /**/