From b5bee4d1b4ede2cdd6d5ada2fc13325186e25700 Mon Sep 17 00:00:00 2001 From: RafaelVolkmer Date: Sun, 29 Dec 2024 10:27:40 -0300 Subject: [PATCH] Update libmemalloc.c --- src/libmemalloc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libmemalloc.c b/src/libmemalloc.c index b0fc825..3850fef 100644 --- a/src/libmemalloc.c +++ b/src/libmemalloc.c @@ -163,6 +163,10 @@ int MEM_validPointerCheck(mem_allocator_t *allocator, void *ptr) block_header_t *block = NULL; + uintptr_t user_ptr = 0u; + uintptr_t heap_start = 0u; + uintptr_t heap_end = 0u; + /* Check deference/argument boundaries */ if (allocator == NULL) { @@ -560,7 +564,7 @@ void *MEM_allocatorMalloc(mem_allocator_t *allocator, size_t size, const char *f /* Definition of Function Variables */ int ret = 0u; - size_t aligned_size = 0u + size_t aligned_size = 0u; void *user_ptr = NULL; block_header_t *block = NULL;