mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2025-12-06 07:12:32 +01:00
Fix possible NULL dereference issue in X509 cert_req program
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
This commit is contained in:
parent
e7ebec6723
commit
ac97af223e
|
|
@ -261,6 +261,9 @@ usage:
|
||||||
|
|
||||||
if ((subtype_value = strchr(q, ':')) != NULL) {
|
if ((subtype_value = strchr(q, ':')) != NULL) {
|
||||||
*subtype_value++ = '\0';
|
*subtype_value++ = '\0';
|
||||||
|
} else {
|
||||||
|
mbedtls_printf("Invalid argument for option SAN: Entry should be separated by a colon\n");
|
||||||
|
goto usage;
|
||||||
}
|
}
|
||||||
if (strcmp(q, "RFC822") == 0) {
|
if (strcmp(q, "RFC822") == 0) {
|
||||||
cur->node.type = MBEDTLS_X509_SAN_RFC822_NAME;
|
cur->node.type = MBEDTLS_X509_SAN_RFC822_NAME;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue