aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-01-25 02:12:06 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-01-27 02:39:42 -0500
commitc15e796211f04b16f58d06fe440f4009a69a1a01 (patch)
tree3ca8a669031c1af9ed41496a600e2f39601d95a0
parente1d81178ccf374e7142207356a022bdf10571918 (diff)
downloadrneovim-c15e796211f04b16f58d06fe440f4009a69a1a01.tar.gz
rneovim-c15e796211f04b16f58d06fe440f4009a69a1a01.tar.bz2
rneovim-c15e796211f04b16f58d06fe440f4009a69a1a01.zip
coverity/125476: RI: Null pointer dereference
-rw-r--r--src/nvim/eval.c12
-rw-r--r--src/nvim/version.c6
2 files changed, 12 insertions, 6 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 219bd38d82..33c584eede 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -10786,15 +10786,15 @@ static void f_globpath(typval_T *argvars, typval_T *rettv)
}
}
-/*
- * "glob2regpat()" function
- */
+// "glob2regpat()" function
static void f_glob2regpat(typval_T *argvars, typval_T *rettv)
{
- char_u *pat = get_tv_string_chk(&argvars[0]);
+ char_u *pat = get_tv_string_chk(&argvars[0]); // NULL on type error
- rettv->v_type = VAR_STRING;
- rettv->vval.v_string = file_pat_to_reg_pat(pat, NULL, NULL, FALSE);
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = (pat == NULL)
+ ? NULL
+ : file_pat_to_reg_pat(pat, NULL, NULL, false);
}
/*
diff --git a/src/nvim/version.c b/src/nvim/version.c
index dcd1773a7a..acdee8c005 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -69,6 +69,12 @@ static char *features[] = {
// clang-format off
static int included_patches[] = {
+ 1081,
+
+
+
+
+
1055,
// 1054,
// 1053,