mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
In wc_ecc_verify_hash_ex, return if ALLOC_CURVE_SPECS() fails
This prevents a NULL pointer dereference later in the function.
This commit is contained in:
@ -7108,6 +7108,9 @@ int wc_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash,
|
|||||||
|
|
||||||
#if !defined(WOLFSSL_SP_MATH) || defined(FREESCALE_LTC_ECC)
|
#if !defined(WOLFSSL_SP_MATH) || defined(FREESCALE_LTC_ECC)
|
||||||
ALLOC_CURVE_SPECS(ECC_CURVE_FIELD_COUNT, err);
|
ALLOC_CURVE_SPECS(ECC_CURVE_FIELD_COUNT, err);
|
||||||
|
if (err != 0) {
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(HAVE_CAVIUM_V)
|
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(HAVE_CAVIUM_V)
|
||||||
err = wc_ecc_alloc_mpint(key, &key->e);
|
err = wc_ecc_alloc_mpint(key, &key->e);
|
||||||
|
Reference in New Issue
Block a user