]> granicus.if.org Git - vim/commitdiff
patch 8.2.1104: Coverity warnts for possible NULL pointer use v8.2.1104
authorBram Moolenaar <Bram@vim.org>
Wed, 1 Jul 2020 11:15:24 +0000 (13:15 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 1 Jul 2020 11:15:24 +0000 (13:15 +0200)
Problem:    Coverity warnts for possible NULL pointer use.
Solution:   Check "pbyts" is not NULL.

src/spellsuggest.c
src/version.c

index 6f9a756984455fd2595b69bfaf3d640a964978ec..0821dc62cb56aff98313a282affb7f97dc007353 100644 (file)
@@ -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.
index 53bb772a906b2d7634040034de7ac10717a63cdf..4c3ab9639c75787cbe1a36f330b3df8acdb6e64c 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1104,
 /**/
     1103,
 /**/