Nikolay Sivov : gdiplus: Check count argument in GdipVectorTransformMatrixPoints.
Alexandre Julliard
julliard at winehq.org
Tue May 13 04:40:00 CDT 2008
Module: wine
Branch: master
Commit: 2d6ae5dec6941f03e6c8014df5b0c89cab82788a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2d6ae5dec6941f03e6c8014df5b0c89cab82788a
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Tue May 13 02:12:57 2008 +0400
gdiplus: Check count argument in GdipVectorTransformMatrixPoints.
---
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 cf8b44b..eb83884 100644
--- a/dlls/gdiplus/matrix.c
+++ b/dlls/gdiplus/matrix.c
@@ -317,7 +317,7 @@ GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix *matrix, GpPointF *
REAL x, y;
INT i;
- if(!matrix || !pts)
+ if(!matrix || !pts || count <= 0)
return InvalidParameter;
for(i = 0; i < count; i++)
@@ -338,6 +338,9 @@ GpStatus WINGDIPAPI GdipVectorTransformMatrixPointsI(GpMatrix *matrix, GpPoint *
GpStatus ret;
INT i;
+ if(count <= 0)
+ return InvalidParameter;
+
ptsF = GdipAlloc(sizeof(GpPointF) * count);
if(!ptsF)
return OutOfMemory;
More information about the wine-cvs
mailing list