Module: wine Branch: master Commit: 4361cbabd7c133184f487719232b3341e760b1f4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4361cbabd7c133184f48771923...
Author: Vincent Povirk vincent@codeweavers.com Date: Tue Oct 28 16:09:57 2014 -0500
gdiplus: Fix error when drawing from a rectangle outside bitmap bounds.
---
dlls/gdiplus/graphics.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index d192bf2..840d866 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -827,6 +827,10 @@ static void get_bitmap_sample_size(InterpolationMode interpolation, WrapMode wra right = bitmap->width-1; if (bottom >= bitmap->height) bottom = bitmap->height-1; + if (bottom < top || right < left) + /* entirely outside image, just sample a pixel so we don't have to + * special-case this later */ + left = top = right = bottom = 0; } else {