Alexandre Julliard : comctl32/imagelist: Initialize the mask bits to zero in case the mask bitmap is smaller than the image bitmap .

Alexandre Julliard julliard at winehq.org
Tue Jun 1 12:12:44 CDT 2010


Module: wine
Branch: master
Commit: 350f0d398275ceec7f17df9c5bab35d10a3b7fd4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=350f0d398275ceec7f17df9c5bab35d10a3b7fd4

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jun  1 16:26:15 2010 +0200

comctl32/imagelist: Initialize the mask bits to zero in case the mask bitmap is smaller than the image bitmap.

---

 dlls/comctl32/imagelist.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index f699fb3..a73b423 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -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.biBitCount = 1;
         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;
     }
 




More information about the wine-cvs mailing list