Fix XMALLOC of sp_point_256 array

This commit is contained in:
Eric Blankenhorn
2021-05-07 09:12:22 -05:00
parent 1cd8bd3a94
commit 0bc0e0f562
3 changed files with 3 additions and 3 deletions

View File

@@ -32596,7 +32596,7 @@ static int sp_256_ecc_mulmod_fast_8(sp_point_256* r, const sp_point_256* g, cons
(void)heap;
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t = (sp_point_256*)XMALLOC(sizeof(sp_point_256) * 16 + 1,
t = (sp_point_256*)XMALLOC(sizeof(sp_point_256) * (16 + 1),
heap, DYNAMIC_TYPE_ECC);
if (t == NULL)
err = MEMORY_E;

View File

@@ -17891,7 +17891,7 @@ static int sp_256_ecc_mulmod_fast_8(sp_point_256* r, const sp_point_256* g, cons
(void)heap;
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t = (sp_point_256*)XMALLOC(sizeof(sp_point_256) * 16 + 1,
t = (sp_point_256*)XMALLOC(sizeof(sp_point_256) * (16 + 1),
heap, DYNAMIC_TYPE_ECC);
if (t == NULL)
err = MEMORY_E;

View File

@@ -18021,7 +18021,7 @@ static int sp_256_ecc_mulmod_fast_8(sp_point_256* r, const sp_point_256* g, cons
(void)heap;
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t = (sp_point_256*)XMALLOC(sizeof(sp_point_256) * 16 + 1,
t = (sp_point_256*)XMALLOC(sizeof(sp_point_256) * (16 + 1),
heap, DYNAMIC_TYPE_ECC);
if (t == NULL)
err = MEMORY_E;