[PATCH] gdiplus : implements GdipEnumerateMetafileSrcRectDestRectI

김동완 kdw6485 at gmail.com
Sun May 16 23:10:31 CDT 2021


Thanks. That's a good point. In
Windows, GdipEnumerateMetafileSrcRectDestRectI is defined in gdiplusflat.h
as  :
GpStatus WINGDIPAPI
GdipEnumerateMetafileSrcRectDestRectI(
    GpGraphics *            graphics,
    GDIPCONST GpMetafile *  metafile,
    GDIPCONST Rect &        destRect,
    GDIPCONST Rect &        srcRect,
    Unit                    srcUnit,
    EnumerateMetafileProc   callback,
    VOID *                  callbackData,
    GDIPCONST GpImageAttributes *     imageAttributes);

it means the arguments normally cannot be null because the compiler would
block.
We could call the function with null value of two arguments when we use
GetProcAddress.
In that case, the program gets a crash in Windows. if a developer made a
SEH block, the program should go to the exception handler.
So, I think we should not check for null pointers to make it work the same.

2021년 5월 17일 (월) 오전 1:06, Esme Povirk (they/them) <esme at codeweavers.com>님이
작성:

> We should check if destRect or srcRect are NULL before dereferencing
> them. Based on the float version, a NULL destRect should result in an
> InvalidParameter return, and a NULL srcRect should be passed through
> as NULL.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210517/88eb2543/attachment.htm>


More information about the wine-devel mailing list