[PATCH v5 6/7] gdi32: allow passing BITMAPINFO with bmiHeader.biSizeImage == 0 for EMF DC.
Jacek Caban
jacek at codeweavers.com
Tue Nov 2 11:10:18 CDT 2021
On 11/2/21 1:58 AM, Jin-oh Kang wrote:
> On Tue, Nov 2, 2021 at 6:34 AM Jacek Caban <jacek at codeweavers.com> wrote:
>> On 11/1/21 6:31 AM, Jinoh Kang wrote:
>>> + UINT elm_size = coloruse == DIB_PAL_COLORS ? sizeof(WORD) : sizeof(DWORD);
>>> + UINT colours = dst->biClrUsed;
>>> +
>>> + if (colours > UINT_MAX / elm_size)
>>> + return FALSE;
>>
>> Should we use at most 1 << bpp entries here?
> Windows is happy with whatever size is requested for the palette, even
> if it's > (1<<bpp). In fact, setting a large colour table size results
> in OOM. To replicate this behavior, I set the limit to the maximum
> possible with the current implementation.
Okay, that part seems good then.
Thanks,
Jacek
More information about the wine-devel
mailing list