mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-08-03 17:57:49 +00:00
Update fix to be more platform-independent
Co-authored-by: David Horstmann <[email protected]> Signed-off-by: Jonathan Winzig <[email protected]>
This commit is contained in:
co-authored by
David Horstmann
parent
05c722bfd0
commit
5caf20ea80
@@ -382,7 +382,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user