mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Add assertion to prevent processing of large images in remap
This commit is contained in:
@@ -4856,6 +4856,8 @@ void cv::remap( InputArray _src, OutputArray _dst,
|
||||
Mat src = _src.getMat(), map1 = _map1.getMat(), map2 = _map2.getMat();
|
||||
_dst.create( map1.size(), src.type() );
|
||||
Mat dst = _dst.getMat();
|
||||
CV_Assert( dst.cols < SHRT_MAX && dst.rows < SHRT_MAX && src.cols < SHRT_MAX && src.rows < SHRT_MAX );
|
||||
|
||||
if( dst.data == src.data )
|
||||
src = src.clone();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user