aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-05-11 18:00:28 +0200
committerSverker Eriksson <[email protected]>2015-05-11 18:00:28 +0200
commit878bd624d65515b68106bbed23a1bb9c09688034 (patch)
tree3d6a221324f495f4b21b0f7d724fa5514a5ab631 /lib
parent322d2a45d6ac9ee4607797d0ff42ab6180ab8c60 (diff)
downloadotp-878bd624d65515b68106bbed23a1bb9c09688034.tar.gz
otp-878bd624d65515b68106bbed23a1bb9c09688034.tar.bz2
otp-878bd624d65515b68106bbed23a1bb9c09688034.zip
crypto: Fix bug in generate_key(ecdh,...)
that could cause VM crash on faulty input.
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto/c_src/crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index 22c430bcd3..adacdcbc73 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -3749,7 +3749,7 @@ out:
static ERL_NIF_TERM ec_key_generate(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
#if defined(HAVE_EC)
- EC_KEY *key;
+ EC_KEY *key = NULL;
const EC_GROUP *group;
const EC_POINT *public_key;
ERL_NIF_TERM priv_key;