mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-30 08:19:09 +00:00
Avoid indexing an array with a negative value.
Reported by: Coverity CID: 971121
This commit is contained in:
parent
16a9eab953
commit
a5f637460b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299583
@ -726,7 +726,7 @@ ber_scanf_elements(struct ber_element *ber, char *fmt, ...)
|
||||
continue;
|
||||
case '}':
|
||||
case ')':
|
||||
if (parent[level] == NULL)
|
||||
if (level < 0 || parent[level] == NULL)
|
||||
goto fail;
|
||||
ber = parent[level--];
|
||||
ret++;
|
||||
|
Loading…
Reference in New Issue
Block a user