diff options
author | Albert Astals Cid <aacid@kde.org> | 2019-07-15 23:24:22 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2019-07-15 23:24:22 +0200 |
commit | 68ef84e5968a4249c2162b839ca6d7975048a557 (patch) | |
tree | d204efca822d563c6bf905e1337ecca76d5cdf3a | |
parent | b224e2f5739fe61de9fa69955d016725b2a4b78d (diff) |
JPXStream::init: ignore dict Length if clearly broken
Fixes issue #805
-rw-r--r-- | poppler/JPEG2000Stream.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/poppler/JPEG2000Stream.cc b/poppler/JPEG2000Stream.cc index 0eea3a2d..8e6902f4 100644 --- a/poppler/JPEG2000Stream.cc +++ b/poppler/JPEG2000Stream.cc @@ -219,7 +219,7 @@ void JPXStream::init() } int bufSize = BUFFER_INITIAL_SIZE; - if (oLen.isInt()) bufSize = oLen.getInt(); + if (oLen.isInt() && oLen.getInt() > 0) bufSize = oLen.getInt(); bool indexed = false; if (cspace.isArray() && cspace.arrayGetLength() > 0) { |