mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Force step to be ptrdiff_t in resize
Otherwise, ASAN could return an error: "runtime error: addition of unsigned offset"
This commit is contained in:
@@ -1030,7 +1030,7 @@ void Mat::resize(size_t nelems)
|
||||
reserve(nelems);
|
||||
|
||||
size.p[0] = (int)nelems;
|
||||
dataend += (size.p[0] - saveRows)*step.p[0];
|
||||
dataend += (size.p[0] - saveRows)*(ptrdiff_t)step.p[0];
|
||||
|
||||
//updateContinuityFlag(*this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user