mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user