summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <bcook@cvs.openbsd.org>2019-05-10 19:15:07 +0000
committerBrent Cook <bcook@cvs.openbsd.org>2019-05-10 19:15:07 +0000
commitf6f0a0a397dae85cbccd44b8173da0c35e1f624e (patch)
treee6acc68fa91b63e1d4394e54b49db31ed7ae0fdd
parent42c977ae94893825aa63ec954777089c17f36d94 (diff)
Initialize EC_KEY_METHOD before use.
Fixes COV-186146 ok tb, beck
-rw-r--r--lib/libcrypto/ec/ec_kmeth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/ec/ec_kmeth.c b/lib/libcrypto/ec/ec_kmeth.c
index 664c412c1a7..1fb9e57f32f 100644
--- a/lib/libcrypto/ec/ec_kmeth.c
+++ b/lib/libcrypto/ec/ec_kmeth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_kmeth.c,v 1.4 2019/01/19 01:18:56 tb Exp $ */
+/* $OpenBSD: ec_kmeth.c,v 1.5 2019/05/10 19:15:06 bcook Exp $ */
/*
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
@@ -186,7 +186,7 @@ EC_KEY_METHOD_new(const EC_KEY_METHOD *meth)
{
EC_KEY_METHOD *ret;
- if ((ret = malloc(sizeof(*meth))) == NULL)
+ if ((ret = calloc(1, sizeof(*meth))) == NULL)
return NULL;
if (meth != NULL)
*ret = *meth;