Marcus Meissner : gdiplus: Convert and pass in 3 points, not 1 (Coverity).

Alexandre Julliard julliard at winehq.org
Mon May 30 12:41:17 CDT 2011


Module: wine
Branch: master
Commit: 9af15023a2cbda823942d526f50a7958484e3997
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9af15023a2cbda823942d526f50a7958484e3997

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sun May 29 23:53:45 2011 +0200

gdiplus: Convert and pass in 3 points, not 1 (Coverity).

---

 dlls/gdiplus/matrix.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c
index 1035cc2..acfe989 100644
--- a/dlls/gdiplus/matrix.c
+++ b/dlls/gdiplus/matrix.c
@@ -105,7 +105,8 @@ GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect *rect, GDIPCONST GpPoint
     GpMatrix **matrix)
 {
     GpRectF rectF;
-    GpPointF ptF;
+    GpPointF ptF[3];
+    int i;
 
     TRACE("(%p, %p, %p)\n", rect, pt, matrix);
 
@@ -114,10 +115,11 @@ GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect *rect, GDIPCONST GpPoint
     rectF.Width = (REAL)rect->Width;
     rectF.Height = (REAL)rect->Height;
 
-    ptF.X = (REAL)pt->X;
-    ptF.Y = (REAL)pt->Y;
-
-    return GdipCreateMatrix3(&rectF, &ptF, matrix);
+    for (i = 0; i < 3; i++) {
+        ptF[i].X = (REAL)pt[i].X;
+        ptF[i].Y = (REAL)pt[i].Y;
+    }
+    return GdipCreateMatrix3(&rectF, ptF, matrix);
 }
 
 GpStatus WINGDIPAPI GdipCloneMatrix(GpMatrix *matrix, GpMatrix **clone)




More information about the wine-cvs mailing list