1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Out of buffer access fix in the new 5.x tests.

This commit is contained in:
Alexander Smorkalov
2025-09-12 17:43:39 +03:00
parent 105a3c335b
commit 59c87f3206
+3 -2
View File
@@ -3528,8 +3528,9 @@ TEST_P(MinMaxSupportedMatDepth, minMaxIdx)
{
cv::Mat src = cv::Mat::zeros(16,16, CV_MAKETYPE(GetParam(), 1));
double minV=0.0, maxV=0.0;
int minIdx=0, maxIdx=0;
EXPECT_NO_THROW(cv::minMaxIdx(src, &minV, &maxV, &minIdx, &maxIdx));
int minIdx[2] = {0, 0};
int maxIdx[2] = {0, 0};
EXPECT_NO_THROW(cv::minMaxIdx(src, &minV, &maxV, minIdx, maxIdx));
}
INSTANTIATE_TEST_CASE_P(