From c2cfc956e5ef2de480cded493b88926c7f29be18 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Mon, 9 Feb 2015 15:54:58 +0100 Subject: [PATCH] bn/bn_add.c: fix dead code elimination that went bad. Reviewed-by: Matt Caswell --- crypto/bn/bn_add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/bn/bn_add.c b/crypto/bn/bn_add.c index e09451d88b..57e1cdac16 100644 --- a/crypto/bn/bn_add.c +++ b/crypto/bn/bn_add.c @@ -222,7 +222,7 @@ int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) break; } } - memcpy(rp, ap, sizeof(*rp) * (max - i)); + memcpy(rp, ap, sizeof(*rp) * dif); r->top = max; r->neg = 0; -- 2.40.0