Merge pull request #1869 from sunyxedu/fix/asn1-oid-overflow

fix: off-by-one in asn1_object_identifier_from_octets()
This commit is contained in:
Zhi Guan
2026-06-20 23:41:44 +08:00
committed by GitHub

View File

@@ -1041,7 +1041,7 @@ int asn1_object_identifier_from_octets(uint32_t *nodes, size_t *nodes_cnt, const
while (inlen) {
uint32_t val;
if (*nodes_cnt > ASN1_OID_MAX_NODES) {
if (*nodes_cnt >= ASN1_OID_MAX_NODES) {
error_print();
return -1;
}