gdiplus: Always treat out of range string sizes as INT_MAX.

This commit is contained in:
Vincent Povirk 2010-05-08 16:32:18 -05:00 committed by Alexandre Julliard
parent b7c9adcd06
commit 435762024f
1 changed files with 2 additions and 2 deletions

View File

@ -3544,8 +3544,8 @@ static GpStatus gdip_format_string(GpGraphics *graphics,
nwidth = roundr(rect->Width);
nheight = roundr(rect->Height);
if (nwidth == 0 || rect->Width >= INT_MAX) nwidth = INT_MAX;
if (nheight == 0 || rect->Height >= INT_MAX) nheight = INT_MAX;
if (rect->Width >= INT_MAX || rect->Width < 0.5) nwidth = INT_MAX;
if (rect->Height >= INT_MAX || rect->Width < 0.5) nheight = INT_MAX;
for(i = 0, j = 0; i < length; i++){
/* FIXME: This makes the indexes passed to callback inaccurate. */