diff --git a/wolfcrypt/src/sp_arm32.c b/wolfcrypt/src/sp_arm32.c index 13a441557..c14a231ad 100644 --- a/wolfcrypt/src/sp_arm32.c +++ b/wolfcrypt/src/sp_arm32.c @@ -41750,7 +41750,7 @@ static int sp_384_ecc_mulmod_fast_12(sp_point_384* r, const sp_point_384* g, con (void)heap; #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC) - t = (sp_point_384*)XMALLOC(sizeof(sp_point_384) * 16 + 1, + t = (sp_point_384*)XMALLOC(sizeof(sp_point_384) * (16 + 1), heap, DYNAMIC_TYPE_ECC); if (t == NULL) err = MEMORY_E; @@ -54451,7 +54451,7 @@ static int sp_1024_ecc_mulmod_fast_32(sp_point_1024* r, const sp_point_1024* g, (void)heap; #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC) - t = (sp_point_1024*)XMALLOC(sizeof(sp_point_1024) * 16 + 1, + t = (sp_point_1024*)XMALLOC(sizeof(sp_point_1024) * (16 + 1), heap, DYNAMIC_TYPE_ECC); if (t == NULL) err = MEMORY_E; diff --git a/wolfcrypt/src/sp_armthumb.c b/wolfcrypt/src/sp_armthumb.c index fc979ec73..9f1a198c4 100644 --- a/wolfcrypt/src/sp_armthumb.c +++ b/wolfcrypt/src/sp_armthumb.c @@ -25530,7 +25530,7 @@ static int sp_384_ecc_mulmod_fast_12(sp_point_384* r, const sp_point_384* g, con (void)heap; #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC) - t = (sp_point_384*)XMALLOC(sizeof(sp_point_384) * 16 + 1, + t = (sp_point_384*)XMALLOC(sizeof(sp_point_384) * (16 + 1), heap, DYNAMIC_TYPE_ECC); if (t == NULL) err = MEMORY_E; @@ -36014,7 +36014,7 @@ static int sp_1024_ecc_mulmod_fast_32(sp_point_1024* r, const sp_point_1024* g, (void)heap; #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC) - t = (sp_point_1024*)XMALLOC(sizeof(sp_point_1024) * 16 + 1, + t = (sp_point_1024*)XMALLOC(sizeof(sp_point_1024) * (16 + 1), heap, DYNAMIC_TYPE_ECC); if (t == NULL) err = MEMORY_E; diff --git a/wolfcrypt/src/sp_cortexm.c b/wolfcrypt/src/sp_cortexm.c index 36a980ed6..7d08726d6 100644 --- a/wolfcrypt/src/sp_cortexm.c +++ b/wolfcrypt/src/sp_cortexm.c @@ -25154,7 +25154,7 @@ static int sp_384_ecc_mulmod_fast_12(sp_point_384* r, const sp_point_384* g, con (void)heap; #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC) - t = (sp_point_384*)XMALLOC(sizeof(sp_point_384) * 16 + 1, + t = (sp_point_384*)XMALLOC(sizeof(sp_point_384) * (16 + 1), heap, DYNAMIC_TYPE_ECC); if (t == NULL) err = MEMORY_E; @@ -33853,7 +33853,7 @@ static int sp_1024_ecc_mulmod_fast_32(sp_point_1024* r, const sp_point_1024* g, (void)heap; #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC) - t = (sp_point_1024*)XMALLOC(sizeof(sp_point_1024) * 16 + 1, + t = (sp_point_1024*)XMALLOC(sizeof(sp_point_1024) * (16 + 1), heap, DYNAMIC_TYPE_ECC); if (t == NULL) err = MEMORY_E;