From d7038127ca6b356ad33fdec08aa3b23ac6a817af Mon Sep 17 00:00:00 2001 From: Eliseo Martínez Date: Tue, 3 Feb 2015 17:49:01 +0100 Subject: 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. --- src/nvim/spell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/spell.c') 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 // 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. -- cgit