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

Merge pull request #27780 from asmorkalov:as/minMax_test_fix_5.x

Out of buffer access fix in the new 5.x tests.
This commit is contained in:
Alexander Smorkalov
2025-09-12 20:04:49 +03:00
committed by GitHub
+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(