8ac5e011d6
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
20 lines
715 B
Diff
20 lines
715 B
Diff
diff --git a/poppler/JPEG2000Stream.cc b/poppler/JPEG2000Stream.cc
|
|
--- a/poppler/JPEG2000Stream.cc
|
|
+++ b/poppler/JPEG2000Stream.cc
|
|
@@ -201,7 +201,7 @@ void JPXStream::init()
|
|
if (getDict()) smaskInData = getDict()->lookup("SMaskInData");
|
|
|
|
int bufSize = BUFFER_INITIAL_SIZE;
|
|
- if (oLen.isInt()) bufSize = oLen.getInt();
|
|
+ if (oLen.isInt() && oLen.getInt() > 0) bufSize = oLen.getInt();
|
|
|
|
if (cspace.isArray() && cspace.arrayGetLength() > 0) {
|
|
|
|
@@ -365,7 +365,7 @@ void JPXStream::init()
|
|
}
|
|
|
|
int bufSize = BUFFER_INITIAL_SIZE;
|
|
- if (oLen.isInt()) bufSize = oLen.getInt();
|
|
+ if (oLen.isInt() && oLen.getInt() > 0) bufSize = oLen.getInt();
|
|
|
|
if (cspace.isArray() && cspace.arrayGetLength() > 0) {
|