mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
imgproc: fix using of uninitialized edge[] members in FillConvexPoly
This commit is contained in:
parent
a85b4b5805
commit
fa36b9d345
@ -1171,6 +1171,9 @@ FillConvexPoly( Mat& img, const Point2l* v, int npts, const void* color, int lin
|
|||||||
edge[0].di = 1;
|
edge[0].di = 1;
|
||||||
edge[1].di = npts - 1;
|
edge[1].di = npts - 1;
|
||||||
|
|
||||||
|
edge[0].x = edge[1].x = -XY_ONE;
|
||||||
|
edge[0].dx = edge[1].dx = 0;
|
||||||
|
|
||||||
ptr += img.step*y;
|
ptr += img.step*y;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -1213,6 +1216,9 @@ FillConvexPoly( Mat& img, const Point2l* v, int npts, const void* color, int lin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (edges < 0)
|
||||||
|
break;
|
||||||
|
|
||||||
if (y >= 0)
|
if (y >= 0)
|
||||||
{
|
{
|
||||||
int left = 0, right = 1;
|
int left = 0, right = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user