From d96e1c1ec34cd57f860c677b7dd16ec92862225a Mon Sep 17 00:00:00 2001 From: Eliseo Martínez Date: Thu, 8 Jan 2015 20:14:22 +0100 Subject: coverity/13761: Out-of-bounds-write: FP. Problem : Out-of-bounds-write to a buffer. Diagnostic : False positive. Diagnostic : Suggested error location is under isupper(c) condition, which makes suggested error impossible. Coverity just fails to take isupper() postcondition into account. Resolution : Assert isupper() postcondition. --- src/nvim/mark.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/nvim/mark.c b/src/nvim/mark.c index 47c0c1be80..ef9f0ca408 100644 --- a/src/nvim/mark.c +++ b/src/nvim/mark.c @@ -127,6 +127,7 @@ int setmark_pos(int c, pos_T *pos, int fnum) return OK; } if (isupper(c)) { + assert(c >= 'A' && c <= 'Z'); i = c - 'A'; namedfm[i].fmark.mark = *pos; namedfm[i].fmark.fnum = fnum; -- cgit