pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/print/poppler pull a patch from poppler CVS to fix MOA...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a2ae3c6ad929
branches: trunk
changeset: 524045:a2ae3c6ad929
user: drochner <drochner%pkgsrc.org@localhost>
date: Wed Jan 17 15:53:09 2007 +0000
description:
pull a patch from poppler CVS to fix MOAB-06-01-2007 (DOS)
bump PKGREVISION
diffstat:
print/poppler/Makefile | 4 ++-
print/poppler/distinfo | 4 ++-
print/poppler/patches/patch-ad | 52 ++++++++++++++++++++++++++++++++++++++++++
print/poppler/patches/patch-ae | 13 ++++++++++
4 files changed, 71 insertions(+), 2 deletions(-)
diffs (103 lines):
diff -r 9ee62a3c77b9 -r a2ae3c6ad929 print/poppler/Makefile
--- a/print/poppler/Makefile Wed Jan 17 15:37:35 2007 +0000
+++ b/print/poppler/Makefile Wed Jan 17 15:53:09 2007 +0000
@@ -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 -r 9ee62a3c77b9 -r a2ae3c6ad929 print/poppler/distinfo
--- a/print/poppler/distinfo Wed Jan 17 15:37:35 2007 +0000
+++ b/print/poppler/distinfo Wed Jan 17 15:53:09 2007 +0000
@@ -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 @@
SHA1 (patch-aa) = dba62eabac1d77b5a64c47aaa0ba94208149668b
SHA1 (patch-ab) = 5ff54831e530c857b88f90c91108d1a04178579e
SHA1 (patch-ac) = ba2f2e83897e4c56541da6e9e4f1b61d60fea9b0
+SHA1 (patch-ad) = 437c1514654d3c4caa00f674de9dbd3d66e58127
+SHA1 (patch-ae) = 9f118e4d70df1c523807aa5faeda798a3d7f74f1
diff -r 9ee62a3c77b9 -r a2ae3c6ad929 print/poppler/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/poppler/patches/patch-ad Wed Jan 17 15:53:09 2007 +0000
@@ -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 -r 9ee62a3c77b9 -r a2ae3c6ad929 print/poppler/patches/patch-ae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/poppler/patches/patch-ae Wed Jan 17 15:53:09 2007 +0000
@@ -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);
+ };
+
Home |
Main Index |
Thread Index |
Old Index