Merge pull request #14203 from alalek:fix_ossfuzz_13292

pull/14235/head
Alexander Alekhin 6 years ago
commit d2854448c2
  1. 2
      modules/imgcodecs/src/grfmt_sunras.cpp

@ -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…
Cancel
Save