mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-28 19:13:28 +00:00
Add guard for empty AttributeValue
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
This commit is contained in:
parent
15df01240d
commit
4c7d7bf583
@ -273,7 +273,10 @@ int mbedtls_x509_string_to_names(mbedtls_asn1_named_data **head, const char *nam
|
||||
}
|
||||
|
||||
if (!in_attr_type && ((*c == ',' && *(c-1) != '\\') || c == end)) {
|
||||
if (*s == '#') {
|
||||
if (s >= end) {
|
||||
mbedtls_free(oid.p);
|
||||
return MBEDTLS_ERR_X509_INVALID_NAME;
|
||||
} else if (*s == '#') {
|
||||
#if defined(MBEDTLS_ASN1_PARSE_C)
|
||||
if ((parse_ret =
|
||||
parse_attribute_value_der_encoded(s, (int) (c - s), data, &data_len,
|
||||
|
Loading…
x
Reference in New Issue
Block a user