From 8e804c911edbeb171d66f0b3f1dc1ffecd8e4d39 Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 30 Jun 2016 15:13:20 +1000 Subject: vim-patch:7.4.1136 Problem: Wrong argument to assert_exception() causes a crash. (reported by Coverity) Solution: Check for NULL pointer. Add a test. https://github.com/vim/vim/commit/da5dcd936656f524dd0ae7cb2685245f07f5720f --- 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 f5cffbc3e1..ac0daa226a 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -7667,7 +7667,8 @@ static void f_assert_exception(typval_T *argvars, typval_T *rettv) ga_concat(&ga, (char_u *)"v:exception is not set"); assert_error(&ga); ga_clear(&ga); - } else if (strstr((char *)vimvars[VV_EXCEPTION].vv_str, error) == NULL) { + } else if (error != NULL + && strstr((char *)vimvars[VV_EXCEPTION].vv_str, error) == NULL) { prepare_assert_error(&ga); fill_assert_error(&ga, &argvars[1], NULL, &argvars[0], &vimvars[VV_EXCEPTION].vv_tv); diff --git a/src/nvim/version.c b/src/nvim/version.c index 864aa8d30c..b2c6b332d1 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -558,7 +558,7 @@ static int included_patches[] = { // 1139 NA // 1138 NA 1137, - // 1136, + 1136, // 1135 NA // 1134 NA // 1133 NA -- cgit