Dmitry Timoshkov : gdiplus: Avoid a crash in GdipDrawImagePointRect.

Alexandre Julliard julliard at winehq.org
Mon Feb 18 13:27:06 CST 2013


Module: wine
Branch: master
Commit: f817fb56e87cae9049d5d917382445345baeea3a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f817fb56e87cae9049d5d917382445345baeea3a

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon Feb 18 21:29:12 2013 +0800

gdiplus: Avoid a crash in GdipDrawImagePointRect.

---

 dlls/gdiplus/graphics.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index b9aa912..7d54871 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -3053,6 +3053,8 @@ GpStatus WINGDIPAPI GdipDrawImagePointRect(GpGraphics *graphics, GpImage *image,
 
     TRACE("(%p, %p, %f, %f, %f, %f, %f, %f, %d)\n", graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit);
 
+    if (!graphics || !image) return InvalidParameter;
+
     scale_x = units_scale(srcUnit, graphics->unit, graphics->xres);
     scale_x *= graphics->xres / image->xres;
     scale_y = units_scale(srcUnit, graphics->unit, graphics->yres);




More information about the wine-cvs mailing list