diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c index cf8b44be5bd..eb8388454f0 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;