summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2007-01-17 15:53:09 +0000
committerdrochner <drochner@pkgsrc.org>2007-01-17 15:53:09 +0000
commit0e1fff19c10a6580e3a32c7d765bd4d79bc5a33f (patch)
tree127021e8a5a88f5793f863888720c3ff7e10b6b3 /print
parent3d7793aca1440aa936f56fce86e59e00e2a8d6d5 (diff)
downloadpkgsrc-0e1fff19c10a6580e3a32c7d765bd4d79bc5a33f.tar.gz
pull a patch from poppler CVS to fix MOAB-06-01-2007 (DOS)
bump PKGREVISION
Diffstat (limited to 'print')
-rw-r--r--print/poppler/Makefile4
-rw-r--r--print/poppler/distinfo4
-rw-r--r--print/poppler/patches/patch-ad52
-rw-r--r--print/poppler/patches/patch-ae13
4 files changed, 71 insertions, 2 deletions
diff --git a/print/poppler/Makefile b/print/poppler/Makefile
index 5a0c2ca2d74..dba23f18619 100644
--- a/print/poppler/Makefile
+++ b/print/poppler/Makefile
@@ -1,8 +1,10 @@
-# $NetBSD: Makefile,v 1.19 2006/07/07 15:49:33 jlam Exp $
+# $NetBSD: Makefile,v 1.20 2007/01/17 15:53:09 drochner Exp $
#
.include "../../print/poppler/Makefile.common"
+PKGREVISION= 1
+
COMMENT= PDF rendering library
USE_TOOLS+= gmake
diff --git a/print/poppler/distinfo b/print/poppler/distinfo
index e09b9cf5009..3eb722942ae 100644
--- a/print/poppler/distinfo
+++ b/print/poppler/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2006/10/12 14:12:15 drochner Exp $
+$NetBSD: distinfo,v 1.16 2007/01/17 15:53:09 drochner Exp $
SHA1 (poppler-0.5.4.tar.gz) = edf4e4ff17ef86a7f60f097949ad7db53fa2c3b1
RMD160 (poppler-0.5.4.tar.gz) = f28c89b03388757067505df3c60a1d878626b0dd
@@ -6,3 +6,5 @@ Size (poppler-0.5.4.tar.gz) = 1062401 bytes
SHA1 (patch-aa) = dba62eabac1d77b5a64c47aaa0ba94208149668b
SHA1 (patch-ab) = 5ff54831e530c857b88f90c91108d1a04178579e
SHA1 (patch-ac) = ba2f2e83897e4c56541da6e9e4f1b61d60fea9b0
+SHA1 (patch-ad) = 437c1514654d3c4caa00f674de9dbd3d66e58127
+SHA1 (patch-ae) = 9f118e4d70df1c523807aa5faeda798a3d7f74f1
diff --git a/print/poppler/patches/patch-ad b/print/poppler/patches/patch-ad
new file mode 100644
index 00000000000..dbd1e1933bc
--- /dev/null
+++ b/print/poppler/patches/patch-ad
@@ -0,0 +1,52 @@
+$NetBSD: patch-ad,v 1.2 2007/01/17 15:53:09 drochner Exp $
+
+--- poppler/Catalog.cc.orig 2006-09-13 17:10:52.000000000 +0200
++++ poppler/Catalog.cc
+@@ -26,6 +26,12 @@
+ #include "UGooString.h"
+ #include "Catalog.h"
+
++// This define is used to limit the depth of recursive readPageTree calls
++// This is needed because the page tree nodes can reference their parents
++// leaving us in an infinite loop
++// Most sane pdf documents don't have a call depth higher than 10
++#define MAX_CALL_DEPTH 1000
++
+ //------------------------------------------------------------------------
+ // Catalog
+ //------------------------------------------------------------------------
+@@ -75,7 +81,7 @@ Catalog::Catalog(XRef *xrefA) {
+ pageRefs[i].num = -1;
+ pageRefs[i].gen = -1;
+ }
+- numPages = readPageTree(pagesDict.getDict(), NULL, 0);
++ numPages = readPageTree(pagesDict.getDict(), NULL, 0, 0);
+ if (numPages != numPages0) {
+ error(-1, "Page count in top-level pages object is incorrect");
+ }
+@@ -217,7 +223,7 @@ GooString *Catalog::readMetadata() {
+ return s;
+ }
+
+-int Catalog::readPageTree(Dict *pagesDict, PageAttrs *attrs, int start) {
++int Catalog::readPageTree(Dict *pagesDict, PageAttrs *attrs, int start, int callDepth) {
+ Object kids;
+ Object kid;
+ Object kidRef;
+@@ -262,9 +268,13 @@ int Catalog::readPageTree(Dict *pagesDic
+ // This should really be isDict("Pages"), but I've seen at least one
+ // PDF file where the /Type entry is missing.
+ } else if (kid.isDict()) {
+- if ((start = readPageTree(kid.getDict(), attrs1, start))
+- < 0)
+- goto err2;
++ if (callDepth > MAX_CALL_DEPTH) {
++ error(-1, "Limit of %d recursive calls reached while reading the page tree. If your document is correct and not a test to try to force a crash, please report a bug.", MAX_CALL_DEPTH);
++ } else {
++ if ((start = readPageTree(kid.getDict(), attrs1, start, callDepth + 1))
++ < 0)
++ goto err2;
++ }
+ } else {
+ error(-1, "Kid object (page %d) is wrong type (%s)",
+ start+1, kid.getTypeName());
diff --git a/print/poppler/patches/patch-ae b/print/poppler/patches/patch-ae
new file mode 100644
index 00000000000..734d7a8adc9
--- /dev/null
+++ b/print/poppler/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2007/01/17 15:53:09 drochner Exp $
+
+--- poppler/Catalog.h.orig 2006-01-23 15:43:36.000000000 +0100
++++ poppler/Catalog.h
+@@ -193,7 +193,7 @@ private:
+ PageMode pageMode; // page mode
+ PageLayout pageLayout; // page layout
+
+- int readPageTree(Dict *pages, PageAttrs *attrs, int start);
++ int readPageTree(Dict *pages, PageAttrs *attrs, int start, int callDepth);
+ Object *findDestInTree(Object *tree, GooString *name, Object *obj);
+ };
+