Skip to content

Commit

Permalink
Check return value of EVP_PKEY_new
Browse files Browse the repository at this point in the history
Reviewed-by: Paul Yang <[email protected]>
Reviewed-by: Nicola Tuveri <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#7427)
  • Loading branch information
Bugcheckers authored and romen committed Nov 10, 2018
1 parent dd41956 commit d896b79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ int rsa_main(int argc, char **argv)
} else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) {
EVP_PKEY *pk;
pk = EVP_PKEY_new();
if (pk == NULL)
goto end;

EVP_PKEY_set1_RSA(pk, rsa);
if (outformat == FORMAT_PVK) {
if (pubin) {
Expand Down

0 comments on commit d896b79

Please sign in to comment.