diff options
author | James McCoy <jamessan@jamessan.com> | 2016-05-25 17:13:23 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-05-25 21:02:52 -0400 |
commit | ccef5c9c77543fb0cf1b31c82fcb566cca7eff4c (patch) | |
tree | 78718e500714f9de44a207be334c1b731da7c2e4 /src/nvim/eval.c | |
parent | bc306ab5aa0d2ee7a4653cb1d47615a3f04478a1 (diff) | |
download | rneovim-ccef5c9c77543fb0cf1b31c82fcb566cca7eff4c.tar.gz rneovim-ccef5c9c77543fb0cf1b31c82fcb566cca7eff4c.tar.bz2 rneovim-ccef5c9c77543fb0cf1b31c82fcb566cca7eff4c.zip |
vim-patch:7.4.1567
Problem: Crash in assert_fails().
Solution: Check for NULL. (Dominique Pelle) Add a test.
https://github.com/vim/vim/commit/1abb502635c7f317e05a0cf3ea067101f9d684f5
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index ec53de3269..18d6dc1444 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -7688,7 +7688,8 @@ static void f_assert_fails(typval_T *argvars, typval_T *rettv) char_u buf[NUMBUFLEN]; char *error = (char *)get_tv_string_buf_chk(&argvars[1], buf); - if (strstr((char *)vimvars[VV_ERRMSG].vv_str, error) == NULL) { + if (error == NULL + || strstr((char *)vimvars[VV_ERRMSG].vv_str, error) == NULL) { prepare_assert_error(&ga); fill_assert_error(&ga, &argvars[2], NULL, &argvars[1], &vimvars[VV_ERRMSG].vv_tv); |