parent
1c7629c1c0
commit
63b5e216f8
1 changed files with 4 additions and 0 deletions
|
@ -380,6 +380,10 @@ int mbedtls_x509_set_extension(mbedtls_asn1_named_data **head, const char *oid,
|
||||||
{
|
{
|
||||||
mbedtls_asn1_named_data *cur;
|
mbedtls_asn1_named_data *cur;
|
||||||
|
|
||||||
|
if (0xFFFFFFFF == (uint32_t) val_len) {
|
||||||
|
return MBEDTLS_ERR_X509_BAD_INPUT_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
if ((cur = mbedtls_asn1_store_named_data(head, oid, oid_len,
|
if ((cur = mbedtls_asn1_store_named_data(head, oid, oid_len,
|
||||||
NULL, val_len + 1)) == NULL) {
|
NULL, val_len + 1)) == NULL) {
|
||||||
return MBEDTLS_ERR_X509_ALLOC_FAILED;
|
return MBEDTLS_ERR_X509_ALLOC_FAILED;
|
||||||
|
|
Loading…
Reference in a new issue