summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2015-02-09 15:54:58 +0100
committerAndy Polyakov <appro@openssl.org>2015-02-09 15:54:58 +0100
commitc2cfc956e5ef2de480cded493b88926c7f29be18 (patch)
tree2180424869439e05f085acd3950a3382d5a90120
parent9c7a780bbebc1b6d87dc38a6aa3339033911a8bb (diff)
bn/bn_add.c: fix dead code elimination that went bad.
Reviewed-by: Matt Caswell <matt@openssl.org>
-rw-r--r--crypto/bn/bn_add.c2
1 files changed, 1 insertions, 1 deletions
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;