forked from wolfSSL/wolfssl
fix scan-build 272 warnings
This commit is contained in:
@ -1565,10 +1565,8 @@ void fp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(USE_MEMSET)
|
|
||||||
/* now zero the buff */
|
/* now zero the buff */
|
||||||
XMEMSET(c, 0, sizeof c);
|
XMEMSET(c, 0, sizeof c);
|
||||||
#endif
|
|
||||||
pa = m->used;
|
pa = m->used;
|
||||||
|
|
||||||
/* copy the input */
|
/* copy the input */
|
||||||
@ -1576,11 +1574,6 @@ void fp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp)
|
|||||||
for (x = 0; x < oldused; x++) {
|
for (x = 0; x < oldused; x++) {
|
||||||
c[x] = a->dp[x];
|
c[x] = a->dp[x];
|
||||||
}
|
}
|
||||||
#if !defined(USE_MEMSET)
|
|
||||||
for (; x < 2*pa+1; x++) {
|
|
||||||
c[x] = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
MONT_START;
|
MONT_START;
|
||||||
|
|
||||||
for (x = 0; x < pa; x++) {
|
for (x = 0; x < pa; x++) {
|
||||||
|
@ -1419,6 +1419,7 @@ int CyaSSL_Init(void)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rsaKey = 1;
|
rsaKey = 1;
|
||||||
|
(void)rsaKey; /* for no ecc builds */
|
||||||
}
|
}
|
||||||
FreeRsaKey(&key);
|
FreeRsaKey(&key);
|
||||||
}
|
}
|
||||||
|
@ -160,6 +160,9 @@ static void doPRF(byte* digest, word32 digLen, const byte* secret,word32 secLen,
|
|||||||
return;
|
return;
|
||||||
if (digLen > MAX_PRF_DIG)
|
if (digLen > MAX_PRF_DIG)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
XMEMSET(md5_result, 0, digLen);
|
||||||
|
XMEMSET(sha_result, 0, digLen);
|
||||||
|
|
||||||
XMEMCPY(md5_half, secret, half);
|
XMEMCPY(md5_half, secret, half);
|
||||||
XMEMCPY(sha_half, secret + half - secLen % 2, half);
|
XMEMCPY(sha_half, secret + half - secLen % 2, half);
|
||||||
|
Reference in New Issue
Block a user