From 2fd7a2e4ae4d35b2a89d817fe340f15a76b63639 Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 28 Jun 2024 15:25:01 -0700 Subject: [PATCH] Fix for test.c `memcb_test` and missing XREALLOC. --- wolfcrypt/test/test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index a7c5a134e0..e2e3461516 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -53600,8 +53600,8 @@ static void *my_Realloc_cb(void *ptr, size_t size) WOLFSSL_TEST_SUBROUTINE wc_test_ret_t memcb_test(void) { wc_test_ret_t ret = 0; -#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_LINUXKM) && \ - !defined(WOLFSSL_STATIC_MEMORY) +#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_NO_REALLOC) && \ + !defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_STATIC_MEMORY) byte* b = NULL; #endif wolfSSL_Malloc_cb mc; @@ -53614,8 +53614,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t memcb_test(void) if (ret != 0) return WC_TEST_RET_ENC_EC(ret); -#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_LINUXKM) && \ - !defined(WOLFSSL_STATIC_MEMORY) +#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_NO_REALLOC) && \ + !defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_STATIC_MEMORY) /* test realloc */ b = (byte*)XREALLOC(b, 1024, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER); @@ -53650,8 +53650,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t memcb_test(void) ret = WC_TEST_RET_ENC_NC; #endif /* !WOLFSSL_NO_MALLOC */ -#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_LINUXKM) && \ - !defined(WOLFSSL_STATIC_MEMORY) +#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_NO_REALLOC) && \ + !defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_STATIC_MEMORY) exit_memcb: /* reset malloc/free/realloc counts */