projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61e9655
)
ec/ec_mult.c: get BN_CTX_start,end sequence right.
author
Andy Polyakov
<appro@openssl.org>
Mon, 7 May 2018 08:27:45 +0000
(10:27 +0200)
committer
Andy Polyakov
<appro@openssl.org>
Tue, 8 May 2018 10:44:05 +0000
(12:44 +0200)
Triggered by Coverity analysis.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6190)
crypto/ec/ec_mult.c
patch
|
blob
|
history
diff --git
a/crypto/ec/ec_mult.c
b/crypto/ec/ec_mult.c
index 4f6689a94669f10d244b9bdf779f0265617e72fd..6b5553c9b2646acec0c5cd69980e9af457a4ba5b 100644
(file)
--- a/
crypto/ec/ec_mult.c
+++ b/
crypto/ec/ec_mult.c
@@
-140,7
+140,9
@@
static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
int ret = 0;
if (ctx == NULL && (ctx = new_ctx = BN_CTX_secure_new()) == NULL)
- goto err;
+ return 0;
+
+ BN_CTX_start(ctx);
order_bits = BN_num_bits(group->order);
@@
-158,7
+160,6
@@
static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
EC_POINT_BN_set_flags(s, BN_FLG_CONSTTIME);
- BN_CTX_start(ctx);
lambda = BN_CTX_get(ctx);
k = BN_CTX_get(ctx);
if (k == NULL)