From a6b4ef3d29565b68fb8c7104b11b03a99e0b153e Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Wed, 1 Mar 2023 07:56:03 +0000 Subject: Fix [f8ef6b3670] crash. TclpSysAlloc macro was truncating size request to 32 bits on Windows. --- win/tclWinPort.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 2c01a6b..cc9453b 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -518,11 +518,11 @@ typedef DWORD_PTR * PDWORD_PTR; */ #define TclpSysAlloc(size) ((void*)HeapAlloc(GetProcessHeap(), \ - (DWORD)0, (DWORD)size)) + 0, size)) #define TclpSysFree(ptr) (HeapFree(GetProcessHeap(), \ - (DWORD)0, (HGLOBAL)ptr)) + 0, (HGLOBAL)ptr)) #define TclpSysRealloc(ptr, size) ((void*)HeapReAlloc(GetProcessHeap(), \ - (DWORD)0, (LPVOID)ptr, (DWORD)size)) + 0, (LPVOID)ptr, size)) /* This type is not defined in the Windows headers */ #define socklen_t int -- cgit v0.12