mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Fix out of bounds write
This commit is contained in:
committed by
Alexander Alekhin
parent
d0f3468477
commit
c46521ad65
@@ -115,7 +115,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 );
|
||||
|
||||
Reference in New Issue
Block a user