diff options
author | 2019-05-10 19:15:06 +0000 | |
---|---|---|
committer | 2019-05-10 19:15:06 +0000 | |
commit | caa55ec6cd29e83f4f078d6070add047112f3f65 (patch) | |
tree | 93b71fc334e6922727723bd049e29b82e8d9f1d4 | |
parent | Document TIMEVAL_TO_TIMESPEC() and TIMESPEC_TO_TIMEVAL(). (diff) | |
download | wireguard-openbsd-caa55ec6cd29e83f4f078d6070add047112f3f65.tar.xz wireguard-openbsd-caa55ec6cd29e83f4f078d6070add047112f3f65.zip |
Initialize EC_KEY_METHOD before use.
Fixes COV-186146
ok tb, beck
-rw-r--r-- | lib/libcrypto/ec/ec_kmeth.c | 4 |
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; |