X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbn%2Fbn_exp.c;h=feeb7649a5dc5af3ebf665710805637dc9329867;hb=6db2b1490e5da1255f4158dc8c2d4a2dd87cbe7b;hp=61ab56d0df6ce5bd509c18edc23e3ae41a581d4d;hpb=0818dbadf32d193973d84a0736c099166777c071;p=oweals%2Fopenssl.git diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c index 61ab56d0df..feeb7649a5 100644 --- a/crypto/bn/bn_exp.c +++ b/crypto/bn/bn_exp.c @@ -78,8 +78,9 @@ int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) goto err; } } - if (r != rr) - BN_copy(r, rr); + if (r != rr && BN_copy(r, rr) == NULL) + goto err; + ret = 1; err: BN_CTX_end(ctx);