mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 03:33:28 +08:00
imgcodecs(sunras): avoid undefined shift
oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13292
This commit is contained in:
parent
360758e8ae
commit
f2803aba07
@ -90,7 +90,7 @@ bool SunRasterDecoder::readHeader()
|
||||
m_width = m_strm.getDWord();
|
||||
m_height = m_strm.getDWord();
|
||||
m_bpp = m_strm.getDWord();
|
||||
int palSize = 3*(1 << m_bpp);
|
||||
int palSize = (m_bpp > 0 && m_bpp <= 8) ? (3*(1 << m_bpp)) : 0;
|
||||
|
||||
m_strm.skip( 4 );
|
||||
m_encoding = (SunRasType)m_strm.getDWord();
|
||||
|
Loading…
Reference in New Issue
Block a user