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:
35c9408
)
Check return from BN_sub
author
Pauli
<paul.dale@oracle.com>
Tue, 31 Jul 2018 03:11:00 +0000
(13:11 +1000)
committer
Pauli
<paul.dale@oracle.com>
Tue, 31 Jul 2018 03:30:29 +0000
(13:30 +1000)
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6823)
crypto/rsa/rsa_ossl.c
patch
|
blob
|
history
diff --git
a/crypto/rsa/rsa_ossl.c
b/crypto/rsa/rsa_ossl.c
index feb1ab4f0746dfa10f2f5f8c4389cc279d8dd6fb..c441905526c82b0e49c1945e9262498bbb0c6688 100644
(file)
--- a/
crypto/rsa/rsa_ossl.c
+++ b/
crypto/rsa/rsa_ossl.c
@@
-339,7
+339,8
@@
static int rsa_ossl_private_encrypt(int flen, const unsigned char *from,
goto err;
if (padding == RSA_X931_PADDING) {
- BN_sub(f, rsa->n, ret);
+ if (!BN_sub(f, rsa->n, ret))
+ goto err;
if (BN_cmp(ret, f) > 0)
res = f;
else