On Tuesday, March 15, 2016, Alexandre Julliard <<a href="javascript:_e(%7B%7D,'cvml','julliard@winehq.org');" target="_blank">julliard@winehq.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Bruno Jesus <<a>00cpxxx@gmail.com</a>> writes:<br>
<br>
> @@ -1647,27 +1655,33 @@ static LRESULT DecompressBegin(CodecInfo *pi, LPCBITMAPINFOHEADER lpbiIn,<br>
><br>
>    if (lpbiIn->biCompression != BI_RGB)<br>
>    {<br>
> +    int colors;<br>
> +<br>
> +    if (lpbiIn->biClrUsed == 0)<br>
> +      colors = 1 << lpbiIn->biBitCount;<br>
> +    else<br>
> +      colors = lpbiIn->biClrUsed;<br>
<br>
I don't think you want to do that for biBitCount > 8.</blockquote><div><br></div><div>I'm not near the source code now but AFAIR DecompressQuery would refuse such bitmap because it does not support biClrUsed > 0 when bit count > 8. But I will clarify that in a third version, certainly it would be a waste of memory to allocate memory unnecessarely.</div>