StretchDIBits (Take 2)

steve.lustbader at philips.com steve.lustbader at philips.com
Mon Nov 11 10:48:38 CST 2002


Let's try this again, this time without deadlocks.

ChangeLog:
Prevent StretchDIBits from producing an unhandled exception if
lpBitsInfo is null.



<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.





(See attached file: stretchdibits.diff)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stretchdibits.diff
Type: application/octet-stream
Size: 736 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20021111/219fb8e0/stretchdibits.obj


More information about the wine-patches mailing list