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:
Eliseo Martínez 2015-01-08 20:14:22 +01:00
parent 0f029454ad
commit d96e1c1ec3

View File

@ -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;