Merge pull request #9903 from blendin:oob_write_1

pull/9781/merge
Alexander Alekhin 7 years ago
commit cca99bf824
  1. 2
      modules/imgcodecs/src/grfmt_bmp.cpp

@ -118,7 +118,7 @@ bool BmpDecoder::readHeader()
if( m_bpp <= 8 )
{
CV_Assert(clrused <= 256);
CV_Assert(clrused >= 0 && clrused <= 256);
memset(m_palette, 0, sizeof(m_palette));
m_strm.getBytes(m_palette, (clrused == 0? 1<<m_bpp : clrused)*4 );
iscolor = IsColorPalette( m_palette, m_bpp );

Loading…
Cancel
Save