Remove duplicate '+' in comparison string

Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
This commit is contained in:
Agathiyan Bragadeesh 2023-08-10 16:03:27 +01:00
parent 5ca9848513
commit a7f9630925
2 changed files with 2 additions and 2 deletions

View File

@ -910,7 +910,7 @@ int mbedtls_x509_dn_gets(char *buf, size_t size, const mbedtls_x509_name *dn)
c = name->val.p[i];
// Special characters requiring escaping, RFC 4514 Section 2.4
if (c) {
if (strchr(",=+<>;\"\\+", c) ||
if (strchr(",=+<>;\"\\", c) ||
((i == 0) && strchr("# ", c)) ||
((i == name->val.len-1) && (c == ' '))) {
if (j + 1 >= sizeof(s) - 1) {

View File

@ -197,7 +197,7 @@ static int parse_attribute_value_string(const char *s,
hexpair = 1;
*(d++) = n;
c++;
} else if (c == end || !strchr(" ,=+<>#;\"\\+", *c)) {
} else if (c == end || !strchr(" ,=+<>#;\"\\", *c)) {
return MBEDTLS_ERR_X509_INVALID_NAME;
}
}