Commit d4a96b69 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #14234 from alalek:backport_14203

parents 69ff7a76 c4ec46c1
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment