mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 11:10:21 +08:00
Fix processing of SunRaster images with negative maplength
This commit is contained in:
parent
8298644b85
commit
851f20e40c
@ -96,7 +96,7 @@ bool SunRasterDecoder::readHeader()
|
||||
(m_encoding == RAS_OLD || m_encoding == RAS_STANDARD ||
|
||||
(m_type == RAS_BYTE_ENCODED && m_bpp == 8) || m_type == RAS_FORMAT_RGB) &&
|
||||
((m_maptype == RMT_NONE && m_maplength == 0) ||
|
||||
(m_maptype == RMT_EQUAL_RGB && m_maplength <= palSize && m_bpp <= 8)))
|
||||
(m_maptype == RMT_EQUAL_RGB && m_maplength <= palSize && m_maplength > 0 && m_bpp <= 8)))
|
||||
{
|
||||
memset( m_palette, 0, sizeof(m_palette));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user