mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
imgcodecs: add overflow checks
This commit is contained in:
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user