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 7f1f94ee500cb15a9e5e839784278d5c902ffbdb..533a711eda2b8ca092af80cbfcb99f4518db4f4b 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);