poppler/XRef.cc |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 528b64bb077ed37c0d8fc7ae2ef3dc2c0dbb26ca
Author: Fabio D'Urso <[email protected]>
Date:   Tue Sep 4 23:10:17 2012 +0200

    Free entries in the xref form a linked list: terminate it properly when 
writing the XRef
    
    The last entry must point back to object 0. Previously it was left
    unitialized and resulted in "-000000001 00000 f" being written in the
    XRef table.

diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index a076bb0..b516a0f 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -1269,6 +1269,7 @@ void XRef::writeXRef(XRef::XRefWriter *writer, GBool 
writeAllEntries) {
       lastFreeEntry = i;
     }
   }
+  getEntry(lastFreeEntry)->offset = 0;
 
   if (writeAllEntries) {
     writer->startSection(0, size);
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to