From: Bernd Edlinger Date: Tue, 13 Jun 2017 20:08:03 +0000 (+0200) Subject: Fix another possible crash in rsa_ossl_mod_exp. X-Git-Tag: OpenSSL_1_1_1-pre1~1316 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5625567f9c7daaa2e2689647e10e4c5d7370718f;p=oweals%2Fopenssl.git Fix another possible crash in rsa_ossl_mod_exp. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/3675) --- diff --git a/crypto/rsa/rsa_ossl.c b/crypto/rsa/rsa_ossl.c index 5e0ad92cb1..92c4be1868 100644 --- a/crypto/rsa/rsa_ossl.c +++ b/crypto/rsa/rsa_ossl.c @@ -608,6 +608,8 @@ static int rsa_ossl_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) r1 = BN_CTX_get(ctx); m1 = BN_CTX_get(ctx); vrfy = BN_CTX_get(ctx); + if (vrfy == NULL) + goto err; { BIGNUM *p = BN_new(), *q = BN_new();