Vincent Povirk : gdiplus: Always treat out of range string sizes as INT_MAX .
Alexandre Julliard
julliard at winehq.org
Mon May 10 11:59:10 CDT 2010
Module: wine
Branch: master
Commit: 435762024f4b6cf4aa348b21bfc9477b16abd216
URL: http://source.winehq.org/git/wine.git/?a=commit;h=435762024f4b6cf4aa348b21bfc9477b16abd216
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Sat May 8 16:32:18 2010 -0500
gdiplus: Always treat out of range string sizes as INT_MAX.
---
dlls/gdiplus/graphics.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 879646a..68e422e 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -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. */
More information about the wine-cvs
mailing list