diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2004-12-05 01:03:15 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2004-12-05 01:03:15 +0000 |
commit | a0e7c8eede26b29b09057f48b8e51f46f8811ddd (patch) | |
tree | 2b50575b4e9e608b61cb74246915625bd99b85d8 /crypto/bn/bn_mont.c | |
parent | a8e00b17ce840c58787e45411fa2ac4d6b1fb10c (diff) |
Add lots of checks for memory allocation failure, error codes to indicate
failure and freeing up memory if a failure occurs.
PR:620
Diffstat (limited to 'crypto/bn/bn_mont.c')
-rw-r--r-- | crypto/bn/bn_mont.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c index 287392db0f..61416483cb 100644 --- a/crypto/bn/bn_mont.c +++ b/crypto/bn/bn_mont.c @@ -277,7 +277,7 @@ int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx) BN_CTX_start(ctx); if((Ri = BN_CTX_get(ctx)) == NULL) goto err; R= &(mont->RR); /* grab RR as a temp */ - BN_copy(&(mont->N),mod); /* Set N */ + if (!BN_copy(&(mont->N),mod)) goto err; /* Set N */ mont->N.neg = 0; #ifdef MONT_WORD |