aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-01-25 00:50:56 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-01-26 10:33:00 -0500
commit6c7a995c5f585c507ac9aaced3ee859dbd8adab6 (patch)
tree9784dbe71c2faa16569c868f1d5109b2adffa3cf /src
parent6f073ccbf464e2f2cd6d6855aa3f27ee1adcc20d (diff)
downloadrneovim-6c7a995c5f585c507ac9aaced3ee859dbd8adab6.tar.gz
rneovim-6c7a995c5f585c507ac9aaced3ee859dbd8adab6.tar.bz2
rneovim-6c7a995c5f585c507ac9aaced3ee859dbd8adab6.zip
spell: zero-init structs to fix garbage ptrs
Diffstat (limited to 'src')
-rw-r--r--src/nvim/spell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index c75a53a777..48c3d42baa 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -848,7 +848,7 @@ static void find_word(matchinf_T *mip, int mode)
mip->mi_compflags[mip->mi_complen] = ((unsigned)flags >> 24);
mip->mi_compflags[mip->mi_complen + 1] = NUL;
if (word_ends) {
- char_u fword[MAXWLEN];
+ char_u fword[MAXWLEN] = { 0 };
if (slang->sl_compsylmax < MAXWLEN) {
// "fword" is only needed for checking syllables.
@@ -3603,7 +3603,7 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so
{
char_u tword[MAXWLEN]; // good word collected so far
trystate_T stack[MAXWLEN];
- char_u preword[MAXWLEN * 3]; // word found with proper case;
+ char_u preword[MAXWLEN * 3] = { 0 }; // word found with proper case;
// concatenation of prefix compound
// words and split word. NUL terminated
// when going deeper but not when coming