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@winehq.org Reporter: petrum@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