Module: wine Branch: master Commit: 5eaf84d39b82f26b280fbd6e82d93c0e27633a73 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5eaf84d39b82f26b280fbd6e82...
Author: Nikolay Sivov bunglehead@gmail.com Date: Tue May 13 02:04:51 2008 +0400
gdiplus: Check count argument in GdipTransformMatrixPoints.
---
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;