gdiplus: check "count" arguiment in GdipTransformMatrixPoints
Nikolay Sivov
bunglehead at gmail.com
Mon May 12 17:04:51 CDT 2008
Changelog:
- Check point count like native version does.
---
dlls/gdiplus/matrix.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c
index a8617db..cf8b44b 100644
--- a/dlls/gdiplus/matrix.c
+++ b/dlls/gdiplus/matrix.c
@@ -244,7 +244,7 @@ GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts,
REAL x, y;
INT i;
- if(!matrix || !pts)
+ if(!matrix || !pts || count <= 0)
return InvalidParameter;
for(i = 0; i < count; i++)
@@ -265,6 +265,9 @@ GpStatus WINGDIPAPI GdipTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, I
GpStatus ret;
INT i;
+ if(count <= 0)
+ return InvalidParameter;
+
ptsF = GdipAlloc(sizeof(GpPointF) * count);
if(!ptsF)
return OutOfMemory;
--
1.4.4.4
More information about the wine-patches
mailing list