diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-31 11:44:48 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-31 11:44:48 +0000 |
commit | 48a604845e33399893d6bf293e71bcd2a412800d (patch) | |
tree | 9958f24c17c9f14394b09e1ac1f4de8af6be776e | |
parent | 44d1f89c241c611a0904dbbca784facfa13b7916 (diff) |
patch 8.2.4269: Coverity warns for using a NULL pointerv8.2.4269
Problem: Coverity warns for using a NULL pointer.
Solution: Check for "name" to not be NULL.
-rw-r--r-- | src/userfunc.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c index 747e4d4778..371cfd328a 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -4232,7 +4232,8 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free) name = prefixed; } } - else if (vim9script && vim_strchr(name, AUTOLOAD_CHAR) != NULL) + else if (vim9script && name != NULL + && vim_strchr(name, AUTOLOAD_CHAR) != NULL) { emsg(_(e_cannot_use_name_with_hash_in_vim9_script_use_export_instead)); goto ret_free; diff --git a/src/version.c b/src/version.c index abc67424c6..87f3845626 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4269, +/**/ 4268, /**/ 4267, |