Hi,

The attached PDF (D1.pdf) gave me hard time this morning when I tried to open 
it in PoDoFoBrowser. At first I’ve tracked down an overwrite of the filename 
passed to PdfMemDocument constructor by Fontconfig (which I’ll try to handle 
later). I rebuilt without Fontconfig and still crashed PoDoFoBrowser, this 
time in PdfInputDevice::Clear.
To be honest, I did not even try to understand why m_pStream was null and if 
it was legitimate or not, just checked for its nulliness and now it works.

Index: ../src/PdfInputDevice.h
===================================================================
--- ../src/PdfInputDevice.h     (révision 1064)
+++ ../src/PdfInputDevice.h     (copie de travail)
@@ -46,7 +46,7 @@
     PdfInputDevice( const char* pszFilename );

 #ifdef _WIN32
-#if defined(_MSC_VER)  &&  _MSC_VER <= 1200                    // nicht f�r 
Visualstudio 6
+#if defined(_MSC_VER)  &&  _MSC_VER <= 1200                    // nicht f�r 
Visualstudio 6
 #else
     /** Construct a new PdfInputDevice that reads all data from a file.
      *
@@ -186,7 +186,8 @@

 void PdfInputDevice::Clear(std::ios_base::iostate state) const
 {
-    m_pStream->clear(state);
+       if(m_pStream)
+       m_pStream->clear(state);
 }

 };

bon courage

-- 
Pierre Marchand

Attachment: D1.pdf
Description: Adobe PDF document

------------------------------------------------------------------------------
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to