mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 12:44:45 +02:00
Fix XMALLOC of sp_point_256 array
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user