From 878bd624d65515b68106bbed23a1bb9c09688034 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 11 May 2015 18:00:28 +0200 Subject: crypto: Fix bug in generate_key(ecdh,...) that could cause VM crash on faulty input. --- lib/crypto/c_src/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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; -- cgit v1.2.3