gdi32/bitblt: GdiAlphaBlend - Check for NULL Pointer (incl. testcase)

Paul Vriens paul.vriens.wine at gmail.com
Fri Sep 18 07:09:56 CDT 2009


On 09/18/2009 01:42 PM, Markus Stockhausen wrote:
> Hi,
>
> as I was encouraged to resent the patch from last week in git format I
> hope it will be better this time.
>
> Best regards
>
>
> ------------------------------------------------------------------------
>
>
Hi Markus,

After reading this patch again, it seems to me it's not a 100% correct. 
There is a slight difference in passing hdcSrc as NULL compared to 
retrieving dcSrc via get_dc_ptr.

The actual test sets hdcSrc to NULL, so the corresponding test in the 
implementation should be:

if (!hdcSrc)
     return FALSE;

dcSrc = get_dc_ptr ( hdcSrc );

Now, I don't know whether get_dc_ptr can fail but that's a different matter.

-- 
Cheers,

Paul.



More information about the wine-devel mailing list