summaryrefslogtreecommitdiffstats
path: root/apps/dsa.c
diff options
context:
space:
mode:
authorPavel Kopyl <p.kopyl@samsung.com>2017-10-27 16:13:11 +0300
committerBernd Edlinger <bernd.edlinger@hotmail.de>2017-11-03 15:46:51 +0100
commita6f622bc99ffdc7b34199babb9d200b24a7a6431 (patch)
tree3d135a6aa18fb56667923677a62f4ca98b4efca5 /apps/dsa.c
parent157997f0c00f63b6005f3b5b6e0bb659d795e136 (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)
Diffstat (limited to 'apps/dsa.c')
-rw-r--r--apps/dsa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/dsa.c b/apps/dsa.c
index 5410f04e37..74a68ff64b 100644
--- a/apps/dsa.c
+++ b/apps/dsa.c
@@ -217,6 +217,9 @@ int dsa_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) {
if (pubin) {