mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 13:23:17 +00:00
e6889d46e0
custom adapted patch to accommodate the openjpeg1/openjpeg2 split that 0.61 still has
21 lines
715 B
Diff
21 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) {
|