[Bug 44130] New: Possible access to unintended variable in "dlls/comctl32/ imagelist.c" line 299

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Dec 5 07:57:30 CST 2017


https://bugs.winehq.org/show_bug.cgi?id=44130

            Bug ID: 44130
           Summary: Possible access to unintended variable in
                    "dlls/comctl32/imagelist.c" line 299
           Product: Wine
           Version: 2.22
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: comctl32
          Assignee: wine-bugs at winehq.org
          Reporter: petrum at gmail.com
      Distribution: ---

While experimenting with a CodeSonar plugin we develop, we noticed a
potential bug in file "dlls/comctl32/imagelist.c" line 299 function 
add_with_alpha

mask_info->bmiHeader = info->bmiHeader;
mask_info->bmiHeader.biBitCount = 1;
mask_info->bmiHeader.biSizeImage = mask_width * height;
//299 line is the next one
if (!(mask_bits = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, /*HERE*/
info->bmiHeader.biSizeImage )))
    goto done;
if (!GetDIBits( hdc, hbmMask, 0, height, mask_bits, mask_info, DIB_RGB_COLORS
)) goto done;

Shouldn't you access mask_info (instead of info)?

Regards,
Petru Florin Mihancea

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list