aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2015-02-03 17:49:01 +0100
committerEliseo Martínez <eliseomarmol@gmail.com>2015-02-11 19:10:36 +0100
commitd7038127ca6b356ad33fdec08aa3b23ac6a817af (patch)
tree99a22ef3994861918ff59af0a9307037375c9a39
parentcf8e175cf54281bcad5e704308e92ebb3e6381d3 (diff)
downloadrneovim-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.c2
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.