Commit 988555a5 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3093 from asmorkalov:ocv_array_bound_fix

parents af2434c5 e11333dd
......@@ -470,6 +470,12 @@ cvFloodFill( CvArr* arr, CvPoint seed_point,
depth = CV_MAT_DEPTH(type);
cn = CV_MAT_CN(type);
if ( (cn != 1) && (cn != 3) )
{
CV_Error( CV_StsBadArg, "Number of channels in input image must be 1 or 3" );
return;
}
if( connectivity == 0 )
connectivity = 4;
else if( connectivity != 4 && connectivity != 8 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment