mirror of
https://github.com/opencv/opencv.git
synced 2025-01-19 06:53:50 +08:00
Fix typo leading to heap corruption in OutputArray::create
This commit is contained in:
parent
e143706ef9
commit
ea5225ef3e
@ -1546,10 +1546,10 @@ void _OutputArray::create(int dims, const int* sizes, int mtype, int i, bool all
|
|||||||
int _type = CV_MAT_TYPE(flags);
|
int _type = CV_MAT_TYPE(flags);
|
||||||
for( size_t j = len0; j < len; j++ )
|
for( size_t j = len0; j < len; j++ )
|
||||||
{
|
{
|
||||||
if( v[i].type() == _type )
|
if( v[j].type() == _type )
|
||||||
continue;
|
continue;
|
||||||
CV_Assert( v[i].empty() );
|
CV_Assert( v[j].empty() );
|
||||||
v[i].flags = (v[i].flags & ~CV_MAT_TYPE_MASK) | _type;
|
v[j].flags = (v[j].flags & ~CV_MAT_TYPE_MASK) | _type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user