aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-07-01 23:47:48 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-07-04 10:05:35 -0400
commit37bc089fb9953bf4a82a8a6eaf60fb2f6cea0784 (patch)
tree89103c53c4c4ac192fe65f565135d1dd4319335f
parent9f73715daa3ef849ea89b44b7118fd0cd16fef55 (diff)
downloadrneovim-37bc089fb9953bf4a82a8a6eaf60fb2f6cea0784.tar.gz
rneovim-37bc089fb9953bf4a82a8a6eaf60fb2f6cea0784.tar.bz2
rneovim-37bc089fb9953bf4a82a8a6eaf60fb2f6cea0784.zip
vim-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. https://github.com/vim/vim/commit/11b6600c88165c70d9ccbbdd4d9c96e8266e365f
-rw-r--r--src/nvim/spell.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index df29124dea..95948dac78 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -3762,7 +3762,8 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so
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.
// Count the length of the NULs in the prefix. If there are