mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
coverity/13758: Out-of-bounds read: FP.
Problem : Out-of-bounds read from a buffer. Diagnostic : False positive. Rationale : Suggested error path implies isupper(*str) being true, which makes error vanish. Coverity just fails to take into account isupper() postcondition. Resolution : Assert isupper() postcondition.
This commit is contained in:
parent
641f79099f
commit
0f029454ad
@ -1219,8 +1219,10 @@ int read_viminfo_filemark(vir_T *virp, int force)
|
||||
}
|
||||
} else if (VIM_ISDIGIT(*str))
|
||||
fm = &namedfm[*str - '0' + NMARKS];
|
||||
else
|
||||
else { // is uppercase
|
||||
assert(*str >= 'A' && *str <= 'Z');
|
||||
fm = &namedfm[*str - 'A'];
|
||||
}
|
||||
if (fm != NULL && (fm->fmark.mark.lnum == 0 || force)) {
|
||||
str = skipwhite(str + 1);
|
||||
fm->fmark.mark.lnum = getdigits(&str);
|
||||
|
Loading…
Reference in New Issue
Block a user