Hi

While investigating this for the long term support I found a way to fix this.
However when testing it with the libpodofo-utils package I could not
reproduce the problem. This means that the problem is not worth fixing
in wheezy. However you may be interested in the patch so here it is.

Best regards

// Ola

-- 
 --- Inguza Technology AB --- MSc in Information Technology ----
/  [email protected]                    Folkebogatan 26            \
|  [email protected]                   654 68 KARLSTAD            |
|  http://inguza.com/                Mobile: +46 (0)70-332 1551 |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9  /
 ---------------------------------------------------------------
Index: libpodofo-0.9.0/src/base/PdfXRefStreamParserObject.cpp
===================================================================
--- libpodofo-0.9.0.orig/src/base/PdfXRefStreamParserObject.cpp	2010-10-21 17:09:00.000000000 +0000
+++ libpodofo-0.9.0/src/base/PdfXRefStreamParserObject.cpp	2017-06-05 13:11:23.017438994 +0000
@@ -110,6 +110,10 @@
     char*        pBuffer;
     pdf_long     lBufferLen;
     const size_t entryLen  = static_cast<size_t>(nW[0] + nW[1] + nW[2]);
+    if( entryLen < 0 )
+    {
+      PODOFO_RAISE_ERROR_INFO( ePdfError_NoXRef, "Invalid count in XRef stream" );
+    }
 
     this->GetStream()->GetFilteredCopy( &pBuffer, &lBufferLen );
 

Reply via email to