My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/libraries/poppler/0.61-CVE-2019-9959.patch

20 lines
715 B

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) {