[poppler] Branch 'poppler-0.18' - 2 commits - poppler/PDFDoc.cc utils/pdfseparate.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sun Jan 15 06:07:47 PST 2012


 poppler/PDFDoc.cc    |    4 +++-
 utils/pdfseparate.cc |    5 ++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 7d171e19257023cda55d0040257e8f0a2008271f
Author: Thomas Freitag <Thomas.Freitag at alfa.de>
Date:   Sun Jan 15 15:07:18 2012 +0100

    Fix stack overflow in PDFDoc::markObject()
    
    Bug 44660

diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 2758206..1c85385 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -26,7 +26,7 @@
 // Copyright (C) 2010 Ilya Gorenbein <igorenbein at finjan.com>
 // Copyright (C) 2010 Srinivas Adicherla <srinivas.adicherla at geodesic.com>
 // Copyright (C) 2010 Philip Lorenz <lorenzph+freedesktop at gmail.com>
-// Copyright (C) 2011 Thomas Freitag <Thomas.Freitag at alfa.de>
+// Copyright (C) 2011, 2012 Thomas Freitag <Thomas.Freitag at alfa.de>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -1234,6 +1234,8 @@ void PDFDoc::markObject (Object* obj, XRef *xRef, XRef *countRef, Guint numOffse
         } else {
           XRefEntry *entry = countRef->getEntry(obj->getRef().num + numOffset);
           entry->gen++;
+          if (entry->gen > 9)
+            break;
         } 
         Object obj1;
         getXRef()->fetch(obj->getRef().num, obj->getRef().gen, &obj1);
commit 81c989d905b6ba053c87d2a661d71853ddf96b99
Author: Thomas Freitag <Thomas.Freitag at alfa.de>
Date:   Sun Jan 15 15:04:51 2012 +0100

    Correctly initialize globalParams

diff --git a/utils/pdfseparate.cc b/utils/pdfseparate.cc
index 9e62705..b70a205 100644
--- a/utils/pdfseparate.cc
+++ b/utils/pdfseparate.cc
@@ -4,7 +4,7 @@
 //
 // This file is licensed under the GPLv2 or later
 //
-// Copyright (C) 2011 Thomas Freitag <Thomas.Freitag at alfa.de>
+// Copyright (C) 2011, 2012 Thomas Freitag <Thomas.Freitag at alfa.de>
 //
 //========================================================================
 #include "config.h"
@@ -17,6 +17,7 @@
 #include "goo/GooString.h"
 #include "PDFDoc.h"
 #include "ErrorCodes.h"
+#include "GlobalParams.h"
 
 static int firstPage = 0;
 static int lastPage = 0;
@@ -107,7 +108,9 @@ main (int argc, char *argv[])
 	exitCode = 0;
       goto err0;
     }
+  globalParams = new GlobalParams();
   extractPages (argv[1], argv[2]);
+  delete globalParams;
 
 err0:
 


More information about the poppler mailing list