bn_nist.c: work around clang 3.0 bug.
(cherry picked from commit 750398acd85a7ae220d272d28a76dff7bb269c31)
This commit is contained in:
parent
ae5c1ca377
commit
b9eef98883
@ -286,29 +286,25 @@ const BIGNUM *BN_get0_nist_prime_521(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void nist_cp_bn_0(BN_ULONG *buf, const BN_ULONG *a, int top, int max)
|
static void nist_cp_bn_0(BN_ULONG *dst, const BN_ULONG *src, int top, int max)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
BN_ULONG *_tmp1 = (buf);
|
|
||||||
const BN_ULONG *_tmp2 = (a);
|
|
||||||
|
|
||||||
#ifdef BN_DEBUG
|
#ifdef BN_DEBUG
|
||||||
OPENSSL_assert(top <= max);
|
OPENSSL_assert(top <= max);
|
||||||
#endif
|
#endif
|
||||||
for (i = (top); i != 0; i--)
|
for (i = 0; i < top; i++)
|
||||||
*_tmp1++ = *_tmp2++;
|
dst[i] = src[i];
|
||||||
for (i = (max) - (top); i != 0; i--)
|
for (; i < max; i++)
|
||||||
*_tmp1++ = (BN_ULONG) 0;
|
dst[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nist_cp_bn(BN_ULONG *buf, const BN_ULONG *a, int top)
|
static void nist_cp_bn(BN_ULONG *dst, const BN_ULONG *src, int top)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
BN_ULONG *_tmp1 = (buf);
|
|
||||||
const BN_ULONG *_tmp2 = (a);
|
|
||||||
|
|
||||||
for (i = (top); i != 0; i--)
|
for (i = 0; i < top; i++)
|
||||||
*_tmp1++ = *_tmp2++;
|
dst[i] = src[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BN_BITS2 == 64
|
#if BN_BITS2 == 64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user