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:
e5cd536
)
check BN_copy() return value
author
Bodo Möller
<bodo@openssl.org>
Thu, 26 May 2005 04:30:48 +0000
(
04:30
+0000)
committer
Bodo Möller
<bodo@openssl.org>
Thu, 26 May 2005 04:30:48 +0000
(
04:30
+0000)
crypto/bn/bn_blind.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_blind.c
b/crypto/bn/bn_blind.c
index 40e742dbadd64e178c419684729bd91fafe2a8d6..ca22d4f8bdcb075e8deba9ebe2d44336937999cf 100644
(file)
--- a/
crypto/bn/bn_blind.c
+++ b/
crypto/bn/bn_blind.c
@@
-207,6
+207,8
@@
int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx)
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *ctx)
{
+ int ret = 1;
+
bn_check_top(n);
if ((b->A == NULL) || (b->Ai == NULL))
@@
-216,9
+218,13
@@
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *ctx)
}
if (r != NULL)
- BN_copy(r, b->Ai);
+ {
+ if (!BN_copy(r, b->Ai)) ret=0;
+ }
- return BN_mod_mul(n,n,b->A,b->mod,ctx);
+ if (!BN_mod_mul(n,n,b->A,b->mod,ctx)) ret=0;
+
+ return ret;
}
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx)
@@
-351,4
+357,3
@@
err:
return ret;
}
-