imgcodecs(sunras): avoid undefined shift

backporting of commit: f2803aba07
This commit is contained in:
Alexander Alekhin authored and Alexander Alekhin committed 2019-04-02 18:38:01 +03:00
1 parent 69ff7a76d6
commit c4ec46c195
1 file changed
+1 -1
+1 -1
View File
@@ -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();