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:
f20a59c
)
Coverity 1453629 and 1453638: Error handling issues (NEGATIVE_RETURNS)
author
Pauli
<paul.dale@oracle.com>
Mon, 9 Sep 2019 00:14:32 +0000
(10:14 +1000)
committer
Pauli
<paul.dale@oracle.com>
Tue, 10 Sep 2019 22:27:27 +0000
(08:27 +1000)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/9805)
crypto/rsa/rsa_ossl.c
patch
|
blob
|
history
diff --git
a/crypto/rsa/rsa_ossl.c
b/crypto/rsa/rsa_ossl.c
index 29bd97bd1b250cdcb6a454fff31ad6535100029c..5d5efdbd69db4ca999308d4a42e402035e4f3c48 100644
(file)
--- a/
crypto/rsa/rsa_ossl.c
+++ b/
crypto/rsa/rsa_ossl.c
@@
-470,6
+470,8
@@
static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
goto err;
j = BN_bn2binpad(ret, buf, num);
+ if (j < 0)
+ goto err;
switch (padding) {
case RSA_PKCS1_PADDING:
@@
-569,6
+571,8
@@
static int rsa_ossl_public_decrypt(int flen, const unsigned char *from,
goto err;
i = BN_bn2binpad(ret, buf, num);
+ if (i < 0)
+ goto err;
switch (padding) {
case RSA_PKCS1_PADDING: