1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

core: verify length check from vector to InputArray

This commit is contained in:
Kumataro
2025-09-23 19:46:08 +09:00
parent 691b1bdc05
commit 6dbf7612f9
3 changed files with 21 additions and 1 deletions
+8
View File
@@ -1471,6 +1471,14 @@ TEST(Core_InputArray, empty)
ASSERT_TRUE( _InputArray(data).empty() );
}
TEST(Core_InputArray, convert_from_vector_over2GB)
{
applyTestTag(CV_TEST_TAG_MEMORY_6GB);
// empty buffer more than 2GB size
std::vector<uint8_t> buf(size_t(INT_MAX) + 4096);
EXPECT_ANY_THROW(auto work = _InputArray(buf));
}
TEST(Core_CopyMask, bug1918)
{
Mat_<unsigned char> tmpSrc(100,100);