gdiplus: Handle large input rect in GdipMeasureCharacterRanges.

oldstable
Vincent Povirk 2015-03-23 15:12:06 -05:00 committed by Alexandre Julliard
parent 6ee26aca16
commit 6b97abf930
1 changed files with 3 additions and 0 deletions

View File

@ -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);