BN_usub: Don't copy when r and a the same
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@akamai.com> RT #4100, MR #1264
This commit is contained in:
parent
1786086b05
commit
9f6795e7d2
@ -222,7 +222,7 @@ int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (dif)
|
||||
if (dif && ap != rp)
|
||||
memcpy(rp, ap, sizeof(*rp) * dif);
|
||||
|
||||
r->top = max;
|
||||
|
Loading…
Reference in New Issue
Block a user