projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8298644
)
Fix processing of SunRaster images with negative maplength
author
Stefan Cornelius
<scorneli@redhat.com>
Wed, 24 Jun 2015 22:17:49 +0000
(
00:17
+0200)
committer
Stefan Cornelius
<scorneli@redhat.com>
Wed, 24 Jun 2015 22:17:49 +0000
(
00:17
+0200)
modules/imgcodecs/src/grfmt_sunras.cpp
patch
|
blob
|
history
diff --git
a/modules/imgcodecs/src/grfmt_sunras.cpp
b/modules/imgcodecs/src/grfmt_sunras.cpp
index
6cbefef
..
34e5c4e
100644
(file)
--- a/
modules/imgcodecs/src/grfmt_sunras.cpp
+++ b/
modules/imgcodecs/src/grfmt_sunras.cpp
@@
-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));