svn commit: r260986 - head/contrib/bsnmp/lib

Hartmut Brandt harti at FreeBSD.org
Tue Jan 21 16:49:55 UTC 2014


Author: harti
Date: Tue Jan 21 16:49:54 2014
New Revision: 260986
URL: http://svnweb.freebsd.org/changeset/base/260986

Log:
  Fix a problem with OBJECT IDENTIFIER encoding: need to check the
  second subid to be less than 40, not the first when the first
  subid is 0 or 1.

Modified:
  head/contrib/bsnmp/lib/asn1.c

Modified: head/contrib/bsnmp/lib/asn1.c
==============================================================================
--- head/contrib/bsnmp/lib/asn1.c	Tue Jan 21 16:02:31 2014	(r260985)
+++ head/contrib/bsnmp/lib/asn1.c	Tue Jan 21 16:49:54 2014	(r260986)
@@ -652,7 +652,7 @@ asn_put_objid(struct asn_buf *b, const s
 			err = ASN_ERR_RANGE;
 		}
 		if (oid->subs[0] > 2 ||
-		    (oid->subs[0] < 2 && oid->subs[0] >= 40)) {
+		    (oid->subs[0] < 2 && oid->subs[1] >= 40)) {
 			asn_error(NULL, "oid out of range (%u,%u)",
 			    oid->subs[0], oid->subs[1]);
 			err = ASN_ERR_RANGE;


More information about the svn-src-all mailing list