From 5625567f9c7daaa2e2689647e10e4c5d7370718f Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Tue, 13 Jun 2017 22:08:03 +0200 Subject: [PATCH] Fix another possible crash in rsa_ossl_mod_exp. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/3675) --- crypto/rsa/rsa_ossl.c | 2 ++ 1 file changed, 2 insertions(+) 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(); -- 2.25.1