mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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:
parent
0f029454ad
commit
d96e1c1ec3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user