mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-28 19:21:08 +00:00
Merge pull request #8351 from waleed-elmelegy-arm/fix-null-dereference-in-x509-cert-req
Fix possible NULL dereference issue in X509 cert_req program
This commit is contained in:
commit
d44ee9e6d1
3
ChangeLog.d/fix-issue-x509-cert_req.txt
Normal file
3
ChangeLog.d/fix-issue-x509-cert_req.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Bugfix
|
||||||
|
* Fix possible NULL dereference issue in X509 cert_req program if an entry
|
||||||
|
in the san parameter is not separated by a colon.
|
@ -261,6 +261,10 @@ 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 must be of the form TYPE:value\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…
x
Reference in New Issue
Block a user