diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-01-08 20:14:22 +0100 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-01-08 21:10:47 +0100 |
commit | d96e1c1ec34cd57f860c677b7dd16ec92862225a (patch) | |
tree | ac807d6fb16ee4f94d6503a0f66203c97b4692b3 | |
parent | 0f029454ad086c670e674e6a610f3cf91fe27ecf (diff) | |
download | rneovim-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.c | 1 |
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; |