Commit 350f0d39 authored by Alexandre Julliard's avatar Alexandre Julliard

comctl32/imagelist: Initialize the mask bits to zero in case the mask bitmap is…

comctl32/imagelist: Initialize the mask bits to zero in case the mask bitmap is smaller than the image bitmap.
parent d81ddde2
...@@ -181,7 +181,8 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count, ...@@ -181,7 +181,8 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count,
mask_info->bmiHeader = info->bmiHeader; mask_info->bmiHeader = info->bmiHeader;
mask_info->bmiHeader.biBitCount = 1; mask_info->bmiHeader.biBitCount = 1;
mask_info->bmiHeader.biSizeImage = mask_width * height; mask_info->bmiHeader.biSizeImage = mask_width * height;
if (!(mask_bits = HeapAlloc( GetProcessHeap(), 0, info->bmiHeader.biSizeImage ))) goto done; if (!(mask_bits = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, info->bmiHeader.biSizeImage )))
goto done;
if (!GetDIBits( hdc, hbmMask, 0, height, mask_bits, mask_info, DIB_RGB_COLORS )) goto done; if (!GetDIBits( hdc, hbmMask, 0, height, mask_bits, mask_info, DIB_RGB_COLORS )) goto done;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment