mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-27 15:43:42 +08:00
fix: off-by-one in asn1_object_identifier_from_octets()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user