mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Allow subidentifiers of size UINT_MAX
Make overflow check more accurate and add testcases Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
@ -1012,7 +1012,7 @@ int mbedtls_oid_from_numeric_string(mbedtls_asn1_buf *oid,
|
||||
}
|
||||
}
|
||||
|
||||
if ((UINT_MAX - component2) <= (component1 * 40)) {
|
||||
if (component2 > (UINT_MAX - (component1 * 40))) {
|
||||
ret = MBEDTLS_ERR_ASN1_INVALID_DATA;
|
||||
goto error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user