diff options
author | James McCoy <jamessan@jamessan.com> | 2016-07-08 14:30:16 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-07-23 20:42:46 -0400 |
commit | f1d912c584c10f92fe0710e3a907c3d519fbe7d8 (patch) | |
tree | fcc51e4d8b4f62f54627081a4a487fc344ff3072 /src | |
parent | aece3ffa7dca546bd5c358478dfb9f423519e211 (diff) | |
download | rneovim-f1d912c584c10f92fe0710e3a907c3d519fbe7d8.tar.gz rneovim-f1d912c584c10f92fe0710e3a907c3d519fbe7d8.tar.bz2 rneovim-f1d912c584c10f92fe0710e3a907c3d519fbe7d8.zip |
vim-patch:7.4.1682
Problem: Coverity: no check for NULL.
Solution: Add check for invalid argument to assert_match().
https://github.com/vim/vim/commit/72188e9aae26e6191c68ff673ef145104b17c64f
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 4 | ||||
-rw-r--r-- | src/nvim/version.c | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 7a2ac65ce1..967485af1a 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -7770,7 +7770,9 @@ static void f_assert_match(typval_T *argvars, typval_T *rettv) char_u *pat = get_tv_string_buf_chk(&argvars[0], buf1); char_u *text = get_tv_string_buf_chk(&argvars[1], buf2); - if (!pattern_match(pat, text, false)) { + if (pat == NULL || text == NULL) { + EMSG(_(e_invarg)); + } else if (!pattern_match(pat, text, false)) { garray_T ga; prepare_assert_error(&ga); fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1], true); diff --git a/src/nvim/version.c b/src/nvim/version.c index ff6f93042b..16fdb5f09f 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -91,6 +91,7 @@ static int included_patches[] = { 1716, 1712, 1695, + 1682, 1663, 1654, 1652, |