mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Avoid indexing an array with a negative value.
Reported by: Coverity CID: 971121
This commit is contained in:
parent
16a9eab953
commit
a5f637460b
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue