user32: Allocate memory based on HICON instead of DWORD to fix 64 bit problems
Bruno Jesus
00cpxxx at gmail.com
Sat Jan 17 16:51:07 CST 2015
Copied from Anastasius reply:
HICON = HANDLE = 64-bit on 64-bit but the array is allocated with
hard-coded 32-bit element size instead using 'sizeof(HICON)'.
Full analysis:
https://bugs.winehq.org/show_bug.cgi?id=37907#c1
Fixes:
https://bugs.winehq.org/show_bug.cgi?id=37907
-------------- next part --------------
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 3c31894..353169f 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -1165,7 +1165,7 @@ static HCURSOR CURSORICON_CreateIconFromANI( const BYTE *bits, DWORD bits_size,
cursor = alloc_icon_handle( TRUE, header.num_steps );
if (!cursor) return 0;
- frames = HeapAlloc( GetProcessHeap(), 0, sizeof(DWORD)*header.num_frames );
+ frames = HeapAlloc( GetProcessHeap(), 0, sizeof(HICON)*header.num_frames );
if (!frames)
{
free_icon_handle( cursor );
More information about the wine-patches
mailing list