forked from wolfSSL/wolfssl
Coverity fixes to make static analysis happy.
This commit is contained in:
@ -4630,11 +4630,13 @@ int wc_ecc_sign_hash(const byte* in, word32 inlen, byte* out, word32 *outlen,
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC)
|
||||
/* if async pending then return and skip done cleanup below */
|
||||
if (err == WC_PENDING_E) {
|
||||
key->state++;
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* cleanup */
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC)
|
||||
|
@ -425,7 +425,8 @@ void fp_mul_d(fp_int *a, fp_digit b, fp_int *c)
|
||||
}
|
||||
|
||||
/* zero any excess digits on the destination that we didn't write to */
|
||||
for (; x < oldused; x++) {
|
||||
/* also checking FP_SIZE here for static analysis */
|
||||
for (; x < oldused && x < FP_SIZE; x++) {
|
||||
c->dp[x] = 0;
|
||||
}
|
||||
fp_clamp(c);
|
||||
|
Reference in New Issue
Block a user