From owner-svn-src-head@FreeBSD.ORG Tue Jan 21 16:49:55 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08B88A9F; Tue, 21 Jan 2014 16:49:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E8BA910B6; Tue, 21 Jan 2014 16:49:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0LGnsXA054524; Tue, 21 Jan 2014 16:49:54 GMT (envelope-from harti@svn.freebsd.org) Received: (from harti@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0LGnscn054523; Tue, 21 Jan 2014 16:49:54 GMT (envelope-from harti@svn.freebsd.org) Message-Id: <201401211649.s0LGnscn054523@svn.freebsd.org> From: Hartmut Brandt Date: Tue, 21 Jan 2014 16:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260986 - head/contrib/bsnmp/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jan 2014 16:49:55 -0000 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;