X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fbn%2Fbn_add.c;h=57e1cdac16626be3d588fc0939167dd93f91ff2a;hp=e09451d88bba18c7d793a791dfc100e9813b8187;hb=c2cfc956e5ef2de480cded493b88926c7f29be18;hpb=9c7a780bbebc1b6d87dc38a6aa3339033911a8bb 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;