changeset 21106:47978b89a02e v8.2.1104

patch 8.2.1104: Coverity warnts for possible NULL pointer use Commit: https://github.com/vim/vim/commit/11b6600c88165c70d9ccbbdd4d9c96e8266e365f Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 1 13:15:24 2020 +0200 patch 8.2.1104: Coverity warnts for possible NULL pointer use Problem: Coverity warnts for possible NULL pointer use. Solution: Check "pbyts" is not NULL.
author Bram Moolenaar <Bram@vim.org>
date Wed, 01 Jul 2020 13:30:04 +0200
parents 4851b16ccb56
children 149a89396e3d
files src/spellsuggest.c src/version.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/spellsuggest.c
+++ b/src/spellsuggest.c
@@ -1406,7 +1406,8 @@ suggest_trie_walk(
 	    tword[sp->ts_twordlen] = NUL;
 
 	    if (sp->ts_prefixdepth <= PFD_NOTSPECIAL
-					&& (sp->ts_flags & TSF_PREFIXOK) == 0)
+					&& (sp->ts_flags & TSF_PREFIXOK) == 0
+					&& pbyts != NULL)
 	    {
 		// There was a prefix before the word.  Check that the prefix
 		// can be used with this word.
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1104,
+/**/
     1103,
 /**/
     1102,