StretchDIBits

Dmitry Timoshkov dmitry at baikal.ru
Fri Nov 8 22:00:42 CST 2002


<steve.lustbader at philips.com> wrote:

> According to my quick test on WinXP, StretchDIBits returns 0 if
> lpBits or lpBitsInfo is NULL.  Wine currently produces an unhandled
> exception if lpBitsInfo is null.
> 
> ChangeLog:
> Prevent StretchDIBits from producing an unhandled exception if
> lpBitsInfo is null.
> 
> (See attached file: stretchdibits.diff)

> --- objects/dib.c 23 Oct 2002 18:50:10 -0000 1.70
> +++ objects/dib.c 8 Nov 2002 18:49:19 -0000
> @@ -157,6 +157,9 @@
> DC *dc = DC_GetDCUpdate( hdc );
> if(!dc) return FALSE;
> + if (!bits || !info)
> + return 0;

You have to verify parameters before DC pointer and GDI lock are
grabbed, otherwise we'll get a nice dead lock.

-- 
Dmitry.






More information about the wine-devel mailing list