check return value
authorNils Larsch <nils@openssl.org>
Wed, 1 Jun 2005 22:35:01 +0000 (22:35 +0000)
committerNils Larsch <nils@openssl.org>
Wed, 1 Jun 2005 22:35:01 +0000 (22:35 +0000)
crypto/rsa/rsa_lib.c

index 7f1f94e..533a711 100644 (file)
@@ -402,6 +402,11 @@ BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *in_ctx)
 
        ret = BN_BLINDING_create_param(NULL, e, rsa->n, ctx,
                        rsa->meth->bn_mod_exp, rsa->_method_mod_n);
+       if (ret == NULL)
+               {
+               RSAerr(RSA_F_RSA_SETUP_BLINDING, ERR_R_BN_LIB);
+               goto err;
+               }
        BN_BLINDING_set_thread_id(ret, CRYPTO_thread_id());
 err:
        BN_CTX_end(ctx);