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.
podofo/podofo_maxbytes.patch

47 lines
1.8 KiB

4 years ago
diff -rupN --no-dereference podofo-0.9.7/src/podofo/base/PdfParser.h podofo-0.9.7-new/src/podofo/base/PdfParser.h
--- podofo-0.9.7/src/podofo/base/PdfParser.h 2020-03-27 17:53:35.000000000 +0100
+++ podofo-0.9.7-new/src/podofo/base/PdfParser.h 2021-01-09 20:24:45.356918625 +0100
@@ -39,7 +39,7 @@
#include "PdfVecObjects.h"
#define W_ARRAY_SIZE 3
-#define W_MAX_BYTES 4
+#define W_MAX_BYTES 8
namespace PoDoFo {
4 years ago
diff -rupN --no-dereference podofo-0.9.7/src/podofo/base/PdfXRefStreamParserObject.cpp podofo-0.9.7-new/src/podofo/base/PdfXRefStreamParserObject.cpp
--- podofo-0.9.7/src/podofo/base/PdfXRefStreamParserObject.cpp 2020-10-10 19:17:47.000000000 +0200
+++ podofo-0.9.7-new/src/podofo/base/PdfXRefStreamParserObject.cpp 2021-01-09 20:24:45.356918625 +0100
@@ -237,7 +237,7 @@ void PdfXRefStreamParserObject::ReadXRef
{
int i;
pdf_int64 z;
- unsigned long nData[W_ARRAY_SIZE];
+ pdf_uint64 nData[W_ARRAY_SIZE];
for( i=0;i<W_ARRAY_SIZE;i++ )
{
4 years ago
@@ -253,7 +253,8 @@ void PdfXRefStreamParserObject::ReadXRef
nData[i] = 0;
for( z=W_MAX_BYTES-lW[i];z<W_MAX_BYTES;z++ )
{
- nData[i] = (nData[i] << 8) + static_cast<unsigned char>(*pBuffer);
+ nData[i] <<= 8;
+ nData[i] += static_cast<unsigned char>(*pBuffer);
++pBuffer;
}
}
4 years ago
diff -rupN --no-dereference podofo-0.9.7/src/podofo/base/PdfXRefStreamParserObject.h podofo-0.9.7-new/src/podofo/base/PdfXRefStreamParserObject.h
--- podofo-0.9.7/src/podofo/base/PdfXRefStreamParserObject.h 2019-05-23 12:08:59.000000000 +0200
+++ podofo-0.9.7-new/src/podofo/base/PdfXRefStreamParserObject.h 2021-01-09 20:24:45.356918625 +0100
@@ -38,7 +38,7 @@
#include "PdfParserObject.h"
#define W_ARRAY_SIZE 3
-#define W_MAX_BYTES 4
+#define W_MAX_BYTES 8
namespace PoDoFo {