2 Nov
2021
2 Nov
'21
4:10 p.m.
On 11/2/21 1:58 AM, Jin-oh Kang wrote:
On Tue, Nov 2, 2021 at 6:34 AM Jacek Caban <jacek(a)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