1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43: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:
Vincent Rabaud
2026-03-30 10:41:55 +02:00
parent 2027a33990
commit 5c91261ca0
+1 -1
View File
@@ -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);
}