From 48b36da8306a3006d467b3d2f5fc62716cbada54 Mon Sep 17 00:00:00 2001 From: Marco Oliverio Date: Mon, 28 Oct 2024 16:17:00 +0000 Subject: [PATCH] memory: fix types in wc_LoadStaticMemory_ex() --- wolfcrypt/src/memory.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/wolfcrypt/src/memory.c b/wolfcrypt/src/memory.c index 75d03895e6..ef5bdb7c82 100644 --- a/wolfcrypt/src/memory.c +++ b/wolfcrypt/src/memory.c @@ -695,8 +695,8 @@ static int wc_init_memory_heap(WOLFSSL_HEAP* heap, unsigned int listSz, } int wc_LoadStaticMemory_ex(WOLFSSL_HEAP_HINT** pHint, - unsigned int listSz, const unsigned int* sizeList, - const unsigned int* distList, unsigned char* buf, + unsigned int listSz, const word32* sizeList, + const word32* distList, unsigned char* buf, unsigned int sz, int flag, int maxSz) { WOLFSSL_HEAP* heap = NULL; @@ -773,13 +773,8 @@ int wc_LoadStaticMemory_ex(WOLFSSL_HEAP_HINT** pHint, int wc_LoadStaticMemory(WOLFSSL_HEAP_HINT** pHint, unsigned char* buf, unsigned int sz, int flag, int maxSz) { -#ifdef WOLFSSL_LEAN_STATIC_PSK - word16 sizeList[WOLFMEM_DEF_BUCKETS] = { WOLFMEM_BUCKETS }; - byte distList[WOLFMEM_DEF_BUCKETS] = { WOLFMEM_DIST }; -#else word32 sizeList[WOLFMEM_DEF_BUCKETS] = { WOLFMEM_BUCKETS }; word32 distList[WOLFMEM_DEF_BUCKETS] = { WOLFMEM_DIST }; -#endif int ret = 0; WOLFSSL_ENTER("wc_LoadStaticMemory");