diff options
author | harti <harti@FreeBSD.org> | 2014-01-21 16:49:54 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2014-01-21 16:49:54 +0000 |
commit | 1d748745316abf536574d4d146313619d7edadcd (patch) | |
tree | 13a3c621645ea75aa1d2165c8da59d8b7382b358 /contrib/bsnmp/lib | |
parent | 156ec6d40f99452bfbd6e4a6269d24fd9463cd36 (diff) | |
download | FreeBSD-src-1d748745316abf536574d4d146313619d7edadcd.zip FreeBSD-src-1d748745316abf536574d4d146313619d7edadcd.tar.gz |
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.
Diffstat (limited to 'contrib/bsnmp/lib')
-rw-r--r-- | contrib/bsnmp/lib/asn1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/bsnmp/lib/asn1.c b/contrib/bsnmp/lib/asn1.c index 4d9704f..0c9d09a 100644 --- a/contrib/bsnmp/lib/asn1.c +++ b/contrib/bsnmp/lib/asn1.c @@ -652,7 +652,7 @@ asn_put_objid(struct asn_buf *b, const struct asn_oid *oid) 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; |