mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-16 22:20:56 +00:00
Update fix to be more platform-independent
Co-authored-by: David Horstmann <david.horstmann@arm.com> Signed-off-by: Jonathan Winzig <jwinzig@hilscher.com>
This commit is contained in:
parent
63b5e216f8
commit
a0c9448bea
@ -380,7 +380,7 @@ int mbedtls_x509_set_extension(mbedtls_asn1_named_data **head, const char *oid,
|
||||
{
|
||||
mbedtls_asn1_named_data *cur;
|
||||
|
||||
if (0xFFFFFFFF == (uint32_t) val_len) {
|
||||
if (val_len > (SIZE_MAX - 1)) {
|
||||
return MBEDTLS_ERR_X509_BAD_INPUT_DATA;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user