Skip to content

Commit

Permalink
Merge pull request wolfSSL#8209 from gasbytes/patch-wc-no-err-trace
Browse files Browse the repository at this point in the history
Adding missing checks missing initialization of sp_int/mp_int
  • Loading branch information
douzzer authored Nov 22, 2024
2 parents 03bafdf + 378519d commit 92f587c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions wolfcrypt/src/dsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,32 +1112,32 @@ int wc_DsaVerify_ex(const byte* digest, word32 digestSz, const byte* sig,

#ifdef WOLFSSL_SMALL_STACK
if (s) {
if (ret != WC_NO_ERR_TRACE(MP_INIT_E))
if (ret != WC_NO_ERR_TRACE(MP_INIT_E) && ret != WC_NO_ERR_TRACE(MEMORY_E))
mp_clear(s);
XFREE(s, key->heap, DYNAMIC_TYPE_TMP_BUFFER);
}
if (r) {
if (ret != WC_NO_ERR_TRACE(MP_INIT_E))
if (ret != WC_NO_ERR_TRACE(MP_INIT_E) && ret != WC_NO_ERR_TRACE(MEMORY_E))
mp_clear(r);
XFREE(r, key->heap, DYNAMIC_TYPE_TMP_BUFFER);
}
if (u1) {
if (ret != WC_NO_ERR_TRACE(MP_INIT_E))
if (ret != WC_NO_ERR_TRACE(MP_INIT_E) && ret != WC_NO_ERR_TRACE(MEMORY_E))
mp_clear(u1);
XFREE(u1, key->heap, DYNAMIC_TYPE_TMP_BUFFER);
}
if (u2) {
if (ret != WC_NO_ERR_TRACE(MP_INIT_E))
if (ret != WC_NO_ERR_TRACE(MP_INIT_E) && ret != WC_NO_ERR_TRACE(MEMORY_E))
mp_clear(u2);
XFREE(u2, key->heap, DYNAMIC_TYPE_TMP_BUFFER);
}
if (w) {
if (ret != WC_NO_ERR_TRACE(MP_INIT_E))
if (ret != WC_NO_ERR_TRACE(MP_INIT_E) && ret != WC_NO_ERR_TRACE(MEMORY_E))
mp_clear(w);
XFREE(w, key->heap, DYNAMIC_TYPE_TMP_BUFFER);
}
if (v) {
if (ret != WC_NO_ERR_TRACE(MP_INIT_E))
if (ret != WC_NO_ERR_TRACE(MP_INIT_E) && ret != WC_NO_ERR_TRACE(MEMORY_E))
mp_clear(v);
XFREE(v, key->heap, DYNAMIC_TYPE_TMP_BUFFER);
}
Expand Down

0 comments on commit 92f587c

Please sign in to comment.