summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/crypto/ec/ec_mult.c
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2015-01-11 16:08:14 +0300
committerFedor Indutny <fedor@indutny.com>2015-01-12 21:31:08 +0300
commiteebdf7ac85b36223833330ff7f1057591dcbe651 (patch)
tree04791df2d3c585dc456b9ff853c62e42c57c3372 /deps/openssl/openssl/crypto/ec/ec_mult.c
parentc8676cb3613259c0cfcf88049be652987dccc769 (diff)
downloadandroid-node-v8-eebdf7ac85b36223833330ff7f1057591dcbe651.tar.gz
android-node-v8-eebdf7ac85b36223833330ff7f1057591dcbe651.tar.bz2
android-node-v8-eebdf7ac85b36223833330ff7f1057591dcbe651.zip
deps: update openssl to 1.0.1k
PR-URL: https://github.com/iojs/io.js/pull/289 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/openssl/openssl/crypto/ec/ec_mult.c')
-rw-r--r--deps/openssl/openssl/crypto/ec/ec_mult.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/deps/openssl/openssl/crypto/ec/ec_mult.c b/deps/openssl/openssl/crypto/ec/ec_mult.c
index 19f21675fb..e81200b255 100644
--- a/deps/openssl/openssl/crypto/ec/ec_mult.c
+++ b/deps/openssl/openssl/crypto/ec/ec_mult.c
@@ -445,15 +445,16 @@ int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
wNAF_len = OPENSSL_malloc(totalnum * sizeof wNAF_len[0]);
wNAF = OPENSSL_malloc((totalnum + 1) * sizeof wNAF[0]); /* includes space for pivot */
val_sub = OPENSSL_malloc(totalnum * sizeof val_sub[0]);
-
+
+ /* Ensure wNAF is initialised in case we end up going to err */
+ if (wNAF) wNAF[0] = NULL; /* preliminary pivot */
+
if (!wsize || !wNAF_len || !wNAF || !val_sub)
{
ECerr(EC_F_EC_WNAF_MUL, ERR_R_MALLOC_FAILURE);
goto err;
}
- wNAF[0] = NULL; /* preliminary pivot */
-
/* num_val will be the total number of temporarily precomputed points */
num_val = 0;