From 59c87f32063f7399af6e760cf46ebc986719d8bf Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 12 Sep 2025 17:43:39 +0300 Subject: [PATCH] Out of buffer access fix in the new 5.x tests. --- modules/core/test/test_arithm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/core/test/test_arithm.cpp b/modules/core/test/test_arithm.cpp index b1c1a9676a..fa77547d7b 100644 --- a/modules/core/test/test_arithm.cpp +++ b/modules/core/test/test_arithm.cpp @@ -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(