aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-01-07 23:20:35 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-01-07 23:24:38 -0500
commit3d6cca5a9d7cc9c13af631d2c6d652096203ce13 (patch)
treefe04839cb750831578f8818598acac926d8bf4ab
parente8d61005dc2edb6b89c8bbea156770fbef73aefc (diff)
downloadrneovim-3d6cca5a9d7cc9c13af631d2c6d652096203ce13.tar.gz
rneovim-3d6cca5a9d7cc9c13af631d2c6d652096203ce13.tar.bz2
rneovim-3d6cca5a9d7cc9c13af631d2c6d652096203ce13.zip
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
-rw-r--r--src/nvim/ex_getln.c6
1 files changed, 2 insertions, 4 deletions
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] == ' ')