diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-11-13 19:17:52 +0100 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-11-15 12:48:30 +0100 |
commit | 5f9cacbf326cacb8162f2a5b5fd7ca839f09ae52 (patch) | |
tree | f1d086e85e37c91a2d1cbdf0e5714a252bfe7413 | |
parent | a09b7f2e2e248e967e100018944e65dfe781c84d (diff) | |
download | rneovim-5f9cacbf326cacb8162f2a5b5fd7ca839f09ae52.tar.gz rneovim-5f9cacbf326cacb8162f2a5b5fd7ca839f09ae52.tar.bz2 rneovim-5f9cacbf326cacb8162f2a5b5fd7ca839f09ae52.zip |
Fix warnings: spell.c: store_aff_word(): Garbage value: RI.
Problem : Result of operation is garbage or undefined @ 5809.
Diagnostic : Real issue.
Rationale : When copying flags, first access to
`use_pfxlist[use_pfxlen]` was garbage if
`spin->si_compflags` was null.
Resolution : Make sure `use_pfxlist[use_pfxlen]` always has a value (NUL
if `spin->si_compflags` is NULL).
-rw-r--r-- | src/nvim/spell.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index a760691ad3..c3059d6b0b 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -5804,6 +5804,8 @@ store_aff_word ( // Get compound IDS from the affix list. get_compflags(affile, ae->ae_flags, use_pfxlist + use_pfxlen); + else + use_pfxlist[use_pfxlen] = NUL; // Combine the list of compound flags. // Concatenate them to the prefix IDs list. |