aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/rsa/rsa_eay.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-10-11 23:49:22 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-10-11 23:49:22 +0000
commit776654adffc63426744e83391dc259358f905337 (patch)
tree7c677c1776820e18a42674399eb356e1427a6649 /crypto/rsa/rsa_eay.c
parentd6522548dd0e7fce338a5b1384dc09823493a6a4 (diff)
downloadopenssl-776654adffc63426744e83391dc259358f905337.tar.gz
PR: 2295
Submitted by: Alexei Khlebnikov <alexei.khlebnikov@opera.com> Reviewed by: steve OOM checking. Leak in OOM fix. Fall-through comment. Duplicate code elimination.
Diffstat (limited to 'crypto/rsa/rsa_eay.c')
-rw-r--r--crypto/rsa/rsa_eay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/rsa/rsa_eay.c b/crypto/rsa/rsa_eay.c
index c5eaeeae6b..7c941885f0 100644
--- a/crypto/rsa/rsa_eay.c
+++ b/crypto/rsa/rsa_eay.c
@@ -675,7 +675,7 @@ static int RSA_eay_public_decrypt(int flen, const unsigned char *from,
rsa->_method_mod_n)) goto err;
if ((padding == RSA_X931_PADDING) && ((ret->d[0] & 0xf) != 12))
- BN_sub(ret, rsa->n, ret);
+ if (!BN_sub(ret, rsa->n, ret)) goto err;
p=buf;
i=BN_bn2bin(ret,p);