aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2015-01-08 20:14:22 +0100
committerEliseo Martínez <eliseomarmol@gmail.com>2015-01-08 21:10:47 +0100
commitd96e1c1ec34cd57f860c677b7dd16ec92862225a (patch)
treeac807d6fb16ee4f94d6503a0f66203c97b4692b3
parent0f029454ad086c670e674e6a610f3cf91fe27ecf (diff)
downloadrneovim-d96e1c1ec34cd57f860c677b7dd16ec92862225a.tar.gz
rneovim-d96e1c1ec34cd57f860c677b7dd16ec92862225a.tar.bz2
rneovim-d96e1c1ec34cd57f860c677b7dd16ec92862225a.zip
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.
-rw-r--r--src/nvim/mark.c1
1 files changed, 1 insertions, 0 deletions
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;