summaryrefslogtreecommitdiffstats
path: root/test/ecdsatest.c
diff options
context:
space:
mode:
authorjwalch <jeremy.walch@gmail.com>2020-09-09 22:36:00 -0400
committerTomas Mraz <tmraz@fedoraproject.org>2020-09-17 09:36:52 +0200
commit4bb73d5409c056a878f526280f86cc3c01f8cd68 (patch)
tree42e6f7ee3b30f4346f58d9cf36a4cee7950775a2 /test/ecdsatest.c
parent8230710f04ed70fee41ec3ed8f3e4b1af55be05a (diff)
Add a NULL check to EVP_PKEY_assign
Fixes #12619 Update p_lib.c Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12863)
Diffstat (limited to 'test/ecdsatest.c')
-rw-r--r--test/ecdsatest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ecdsatest.c b/test/ecdsatest.c
index f7d6608f39..471aaa184d 100644
--- a/test/ecdsatest.c
+++ b/test/ecdsatest.c
@@ -252,6 +252,7 @@ static int test_builtin(int n, int as)
|| !TEST_ptr(eckey_neg = EC_KEY_new_by_curve_name(nid))
|| !TEST_true(EC_KEY_generate_key(eckey_neg))
|| !TEST_ptr(pkey_neg = EVP_PKEY_new())
+ || !TEST_false(EVP_PKEY_assign_EC_KEY(pkey_neg, NULL))
|| !TEST_true(EVP_PKEY_assign_EC_KEY(pkey_neg, eckey_neg)))
goto err;