svn commit: r299583 - head/usr.sbin/ypldap
Don Lewis
truckman at FreeBSD.org
Fri May 13 00:58:06 UTC 2016
Author: truckman
Date: Fri May 13 00:58:05 2016
New Revision: 299583
URL: https://svnweb.freebsd.org/changeset/base/299583
Log:
Avoid indexing an array with a negative value.
Reported by: Coverity
CID: 971121
Modified:
head/usr.sbin/ypldap/ber.c
Modified: head/usr.sbin/ypldap/ber.c
==============================================================================
--- head/usr.sbin/ypldap/ber.c Fri May 13 00:50:53 2016 (r299582)
+++ head/usr.sbin/ypldap/ber.c Fri May 13 00:58:05 2016 (r299583)
@@ -726,7 +726,7 @@ ber_scanf_elements(struct ber_element *b
continue;
case '}':
case ')':
- if (parent[level] == NULL)
+ if (level < 0 || parent[level] == NULL)
goto fail;
ber = parent[level--];
ret++;
More information about the svn-src-head
mailing list