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.
This commit is contained in:
parent
2656b5237b
commit
30b5118d51
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user