From ccef5c9c77543fb0cf1b31c82fcb566cca7eff4c Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 25 May 2016 17:13:23 -0400 Subject: 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 --- src/nvim/eval.c | 3 ++- src/nvim/version.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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); diff --git a/src/nvim/version.c b/src/nvim/version.c index 7400385d2d..e66bf44846 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -119,7 +119,7 @@ static int included_patches[] = { 1570, 1569, 1568, - // 1567, + 1567, // 1566 NA // 1565, // 1564, -- cgit