Commit 300797d4 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #11146 from anthonytw:master

parents cd4b748b c6cf7f80
...@@ -511,7 +511,12 @@ std::vector<char> AVIReadContainer::readFrame(frame_iterator it) ...@@ -511,7 +511,12 @@ std::vector<char> AVIReadContainer::readFrame(frame_iterator it)
RiffChunk chunk; RiffChunk chunk;
*(m_file_stream) >> chunk; *(m_file_stream) >> chunk;
CV_Assert(chunk.m_size <= 0xFFFF);
// Assertion added to prevent complaints from static analysis tools
// as the chunk size is read from a file then used to allocate
// memory. 64MB was chosen arbitrarily as an upper bound but it may
// be useful to make it configurable.
CV_Assert(chunk.m_size <= 67108864);
std::vector<char> result; std::vector<char> result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment