Date: Tue, 21 Jan 2014 16:49:54 +0000 (UTC) From: Hartmut Brandt <harti@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260986 - head/contrib/bsnmp/lib Message-ID: <201401211649.s0LGnscn054523@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401211649.s0LGnscn054523>