NULL dereference.

This commit is contained in:
Stanislav Klima
2020-01-29 17:33:21 +01:00
parent df0b0a6e91
commit c3fabb1da6

View File

@@ -1244,6 +1244,9 @@ int wolfSSL_EVP_PKEY_keygen(WOLFSSL_EVP_PKEY_CTX *ctx,
if (pkey == NULL) { if (pkey == NULL) {
ownPkey = 1; ownPkey = 1;
pkey = wolfSSL_PKEY_new(); pkey = wolfSSL_PKEY_new();
if (pkey == NULL)
return ret;
} }
switch (pkey->type) { switch (pkey->type) {