Vincent Povirk : gdiplus: Handle large input rect in GdipMeasureCharacterRanges.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Mar 24 10:00:44 CDT 2015
Module: wine
Branch: master
Commit: 6b97abf930ac40dd9a668ec1fed588fcefd192fb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6b97abf930ac40dd9a668ec1fed588fcefd192fb
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Mon Mar 23 15:12:06 2015 -0500
gdiplus: Handle large input rect in GdipMeasureCharacterRanges.
---
dlls/gdiplus/graphics.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 34022cb..ae530a9 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -4739,6 +4739,9 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics,
scaled_rect.Width = layoutRect->Width * args.rel_width;
scaled_rect.Height = layoutRect->Height * args.rel_height;
+ if (scaled_rect.Width >= 1 << 23) scaled_rect.Width = 1 << 23;
+ if (scaled_rect.Height >= 1 << 23) scaled_rect.Height = 1 << 23;
+
get_font_hfont(graphics, font, stringFormat, &gdifont, NULL);
oldfont = SelectObject(hdc, gdifont);
More information about the wine-cvs
mailing list