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;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to