diff options
author | Pavel Kopyl <p.kopyl@samsung.com> | 2017-10-27 16:13:11 +0300 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-11-03 16:19:00 +0100 |
commit | 950d49d43900e67a1f9d02bc1a053a9fdc5c4257 (patch) | |
tree | cdd82b2607efa9cda55f074362680158720c5169 /apps | |
parent | 200de404214ed045df66e371b1d0a60992ee33d0 (diff) |
Add error handling in dsa_main and ASN1_i2d_bio.
CLA: trivial
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/4600)
(cherry picked from commit a6f622bc99ffdc7b34199babb9d200b24a7a6431)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dsa.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/dsa.c b/apps/dsa.c index 4ed21d891e..82a870eb29 100644 --- a/apps/dsa.c +++ b/apps/dsa.c @@ -327,6 +327,9 @@ int 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_DSA(pk, dsa); if (outformat == FORMAT_PVK) i = i2b_PVK_bio(out, pk, pvk_encr, 0, passout); |