From 3d6cca5a9d7cc9c13af631d2c6d652096203ce13 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 7 Jan 2020 23:20:35 -0500 Subject: vim-patch:8.2.0099: use of NULL pointer when out of memory Problem: Use of NULL pointer when out of memory. Solution: Check for NULL pointer. (Dominique Pelle, closes vim/vim#5449) https://github.com/vim/vim/commit/8b7aa2f9b238df916c161cdacda032c25d72a0ae --- src/nvim/ex_getln.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index c09a3c08ef..b2dc90f3fb 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -4715,8 +4715,7 @@ ExpandFromContext ( int free_pat = FALSE; int i; - /* for ":set path=" and ":set tags=" halve backslashes for escaped - * space */ + // for ":set path=" and ":set tags=" halve backslashes for escaped space if (xp->xp_backslash != XP_BS_NONE) { free_pat = TRUE; pat = vim_strsave(pat); @@ -4984,8 +4983,7 @@ static void expand_shellcmd(char_u *filepat, int *num_file, char_u ***file, int ret; bool did_curdir = false; - /* for ":set path=" and ":set tags=" halve backslashes for escaped - * space */ + // for ":set path=" and ":set tags=" halve backslashes for escaped space pat = vim_strsave(filepat); for (i = 0; pat[i]; ++i) if (pat[i] == '\\' && pat[i + 1] == ' ') -- cgit