gdiplus: Check count argument in GdipVectorTransformMatrixPoints.
This commit is contained in:
parent
5eaf84d39b
commit
2d6ae5dec6
|
@ -317,7 +317,7 @@ GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix *matrix, GpPointF *
|
||||||
REAL x, y;
|
REAL x, y;
|
||||||
INT i;
|
INT i;
|
||||||
|
|
||||||
if(!matrix || !pts)
|
if(!matrix || !pts || count <= 0)
|
||||||
return InvalidParameter;
|
return InvalidParameter;
|
||||||
|
|
||||||
for(i = 0; i < count; i++)
|
for(i = 0; i < count; i++)
|
||||||
|
@ -338,6 +338,9 @@ GpStatus WINGDIPAPI GdipVectorTransformMatrixPointsI(GpMatrix *matrix, GpPoint *
|
||||||
GpStatus ret;
|
GpStatus ret;
|
||||||
INT i;
|
INT i;
|
||||||
|
|
||||||
|
if(count <= 0)
|
||||||
|
return InvalidParameter;
|
||||||
|
|
||||||
ptsF = GdipAlloc(sizeof(GpPointF) * count);
|
ptsF = GdipAlloc(sizeof(GpPointF) * count);
|
||||||
if(!ptsF)
|
if(!ptsF)
|
||||||
return OutOfMemory;
|
return OutOfMemory;
|
||||||
|
|
Loading…
Reference in New Issue