pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/print/xpdf apply the patch from poppler to fix MOAB-06...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b1f19f450d9c
branches: trunk
changeset: 524054:b1f19f450d9c
user: drochner <drochner%pkgsrc.org@localhost>
date: Wed Jan 17 17:38:05 2007 +0000
description:
apply the patch from poppler to fix MOAB-06-01-2007 (DOS)
bump PKGREVISION
diffstat:
print/xpdf/Makefile | 4 +-
print/xpdf/distinfo | 4 ++-
print/xpdf/patches/patch-av | 52 +++++++++++++++++++++++++++++++++++++++++++++
print/xpdf/patches/patch-aw | 13 +++++++++++
4 files changed, 70 insertions(+), 3 deletions(-)
diffs (102 lines):
diff -r e33d2518a0e3 -r b1f19f450d9c print/xpdf/Makefile
--- a/print/xpdf/Makefile Wed Jan 17 17:37:14 2007 +0000
+++ b/print/xpdf/Makefile Wed Jan 17 17:38:05 2007 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.59 2006/11/06 10:47:18 joerg Exp $
+# $NetBSD: Makefile,v 1.60 2007/01/17 17:38:05 drochner Exp $
DISTNAME= xpdf-3.01
PKGNAME= ${DISTNAME}pl2
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= print
MASTER_SITES= ftp://ftp.foolabs.com/pub/xpdf/ \
${MASTER_SITE_SUNSITE:=apps/graphics/viewers/X/xpdf/} \
diff -r e33d2518a0e3 -r b1f19f450d9c print/xpdf/distinfo
--- a/print/xpdf/distinfo Wed Jan 17 17:37:14 2007 +0000
+++ b/print/xpdf/distinfo Wed Jan 17 17:38:05 2007 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.27 2006/05/30 20:03:28 tron Exp $
+$NetBSD: distinfo,v 1.28 2007/01/17 17:38:05 drochner Exp $
SHA1 (xpdf-3.01.tar.gz) = 472cbf0f3df4e20a3ab7ada2e704b4e10d1d385b
RMD160 (xpdf-3.01.tar.gz) = d734065ce12db8d0c37d9d0ac0ca7c287be59442
@@ -24,3 +24,5 @@
SHA1 (patch-ap) = e2782308f544d4589590e833897823f4dc1b6315
SHA1 (patch-ar) = f3d320991e189a21244acd31ca5cc6cfdb18bd96
SHA1 (patch-au) = af765089ee88369da0afef534f46ec50c5cc6d4f
+SHA1 (patch-av) = c4110136862eae9dba84c4abf387c2e580d3e8e0
+SHA1 (patch-aw) = 0aae65012380a0c75596ae260713fdc41b35f9ce
diff -r e33d2518a0e3 -r b1f19f450d9c print/xpdf/patches/patch-av
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/xpdf/patches/patch-av Wed Jan 17 17:38:05 2007 +0000
@@ -0,0 +1,52 @@
+$NetBSD: patch-av,v 1.1 2007/01/17 17:38:05 drochner Exp $
+
+--- xpdf/Catalog.cc.orig 2005-08-17 07:34:31.000000000 +0200
++++ xpdf/Catalog.cc
+@@ -23,6 +23,12 @@
+ #include "Link.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
+ //------------------------------------------------------------------------
+@@ -71,7 +77,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");
+ }
+@@ -169,7 +175,7 @@ GString *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;
+@@ -214,9 +220,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 e33d2518a0e3 -r b1f19f450d9c print/xpdf/patches/patch-aw
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/xpdf/patches/patch-aw Wed Jan 17 17:38:05 2007 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-aw,v 1.1 2007/01/17 17:38:05 drochner Exp $
+
+--- xpdf/Catalog.h.orig 2005-08-17 07:34:31.000000000 +0200
++++ xpdf/Catalog.h
+@@ -85,7 +85,7 @@ private:
+ Object acroForm; // AcroForm dictionary
+ GBool ok; // true if catalog is valid
+
+- int readPageTree(Dict *pages, PageAttrs *attrs, int start);
++ int readPageTree(Dict *pages, PageAttrs *attrs, int start, int callDepth);
+ Object *findDestInTree(Object *tree, GString *name, Object *obj);
+ };
+
Home |
Main Index |
Thread Index |
Old Index