Alexandre Julliard : comctl32/imagelist: Use the correct allocation size for the image mask.
Alexandre Julliard
julliard at winehq.org
Sun Mar 18 09:02:32 CDT 2018
Module: wine
Branch: oldstable
Commit: 0518bbb166d72e6195acc672b20e9a22ff60d5c2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0518bbb166d72e6195acc672b20e9a22ff60d5c2
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Dec 11 19:55:01 2017 +0100
comctl32/imagelist: Use the correct allocation size for the image mask.
Reported by Petru Florin Mihancea.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 5dd9a1f00e7cbc30b306b8290c18b781f27e6af2)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/comctl32/imagelist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index 70457c7..71145ed 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -296,7 +296,7 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count,
mask_info->bmiHeader = info->bmiHeader;
mask_info->bmiHeader.biBitCount = 1;
mask_info->bmiHeader.biSizeImage = mask_width * height;
- if (!(mask_bits = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, info->bmiHeader.biSizeImage )))
+ if (!(mask_bits = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, mask_info->bmiHeader.biSizeImage )))
goto done;
if (!GetDIBits( hdc, hbmMask, 0, height, mask_bits, mask_info, DIB_RGB_COLORS )) goto done;
}
More information about the wine-cvs
mailing list