imgcodecs: add overflow checks

This commit is contained in:
Alexander Alekhin
2018-01-09 17:56:52 +03:00
parent be5247921d
commit 8a76fadaa3
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -95,6 +95,7 @@ bool BmpDecoder::readHeader()
m_offset = m_strm.getDWord();
int size = m_strm.getDWord();
CV_Assert(size > 0); // overflow, 2Gb limit
if( size >= 36 )
{