From e496f3345518e7432322bf5948b5a701d97ae2df Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Sun, 14 Oct 2018 07:47:21 +0200 Subject: [PATCH] Memory.c: fix pointer cast in TrackChangeObjSize() call This commit fixes the "TrackDeleteObj: 0x12345678 is not Object!!" (where 0x12345678 is the actual address) errors with memcheck enabled. It also fixes the following related warnings: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] TrackChangeObjSize((DWORD)addr, size, (DWORD)new_addr); ^ warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] TrackChangeObjSize((DWORD)addr, size, (DWORD)new_addr); ^ --- src/Mayaqua/Memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mayaqua/Memory.c b/src/Mayaqua/Memory.c index 41694735..a82d8962 100644 --- a/src/Mayaqua/Memory.c +++ b/src/Mayaqua/Memory.c @@ -3915,7 +3915,7 @@ void *InternalReAlloc(void *addr, UINT size) } #ifndef DONT_USE_KERNEL_STATUS - TrackChangeObjSize((DWORD)addr, size, (DWORD)new_addr); + TrackChangeObjSize(POINTER_TO_UINT64(addr), size, POINTER_TO_UINT64(new_addr)); #endif // DONT_USE_KERNEL_STATUS return new_addr;