diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-02-03 17:49:01 +0100 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-02-11 19:10:36 +0100 |
commit | d7038127ca6b356ad33fdec08aa3b23ac6a817af (patch) | |
tree | 99a22ef3994861918ff59af0a9307037375c9a39 | |
parent | cf8e175cf54281bcad5e704308e92ebb3e6381d3 (diff) | |
download | rneovim-d7038127ca6b356ad33fdec08aa3b23ac6a817af.tar.gz rneovim-d7038127ca6b356ad33fdec08aa3b23ac6a817af.tar.bz2 rneovim-d7038127ca6b356ad33fdec08aa3b23ac6a817af.zip |
coverity/13764: Out-of-bounds read: RI.
Problem : Out-of-bounds read @ 9514.
Diagnostic : Real issue.
Rationale : PFD_NOTSPECIAL (253) is defined as the maximum not-special
value a prefix can have. But stack (and other) arrays are
defined as having MAXWLEN (250) items.
Resolution : Define MAXWLEN = 254.
-rw-r--r-- | src/nvim/spell.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 1d13a6abad..cbaa44d7eb 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -335,7 +335,7 @@ # include <time.h> // for time_t #endif -#define MAXWLEN 250 // Assume max. word len is this many bytes. +#define MAXWLEN 254 // Assume max. word len is this many bytes. // Some places assume a word length fits in a // byte, thus it can't be above 255. |