diff options
author | drochner <drochner@pkgsrc.org> | 2008-05-15 17:51:29 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2008-05-15 17:51:29 +0000 |
commit | b79e2f2a5f8c8580a979a614e4818282c25c9f92 (patch) | |
tree | e740b5d7eed2744ef92a60157d31dd7ea13fcd67 /print | |
parent | f7db1812d47e1a70ad23d1809751d93e0bf27d6e (diff) | |
download | pkgsrc-b79e2f2a5f8c8580a979a614e4818282c25c9f92.tar.gz |
pull another patch from upstream CVS, to fix a possible crash,
ride on today's PKGREVISION bump
Diffstat (limited to 'print')
-rw-r--r-- | print/poppler/distinfo | 3 | ||||
-rw-r--r-- | print/poppler/patches/patch-ai | 89 |
2 files changed, 91 insertions, 1 deletions
diff --git a/print/poppler/distinfo b/print/poppler/distinfo index e74a96ed42f..33d456a6ab6 100644 --- a/print/poppler/distinfo +++ b/print/poppler/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.27 2008/05/15 09:15:41 drochner Exp $ +$NetBSD: distinfo,v 1.28 2008/05/15 17:51:29 drochner Exp $ SHA1 (poppler-0.8.2.tar.gz) = afa4baa4e0b65c9663cddae7b0b3da8efb1c9263 RMD160 (poppler-0.8.2.tar.gz) = 6593f26070d051c6d5054acc454e15dde97a5203 @@ -7,3 +7,4 @@ SHA1 (patch-aa) = 43c63c16d3a845e394a8eb0c3a321944fcf17615 SHA1 (patch-ab) = e3d413ec50a098af06cb2efc2fac2042064498dd SHA1 (patch-ag) = d1581a1ca40bba34146a4a6f4ee7d38b8f6ff3b7 SHA1 (patch-ah) = ca50d0d8ef6da70f201cc66b0e797dde904b77e0 +SHA1 (patch-ai) = d03a8df1d32822a387f53206a21f8eba41a0c430 diff --git a/print/poppler/patches/patch-ai b/print/poppler/patches/patch-ai new file mode 100644 index 00000000000..a76d829ef64 --- /dev/null +++ b/print/poppler/patches/patch-ai @@ -0,0 +1,89 @@ +$NetBSD: patch-ai,v 1.3 2008/05/15 17:51:29 drochner Exp $ + +--- poppler/OptionalContent.cc.orig 2008-03-26 20:38:52.000000000 +0100 ++++ poppler/OptionalContent.cc +@@ -162,12 +162,18 @@ OptionalContentGroup* OCGs::findOcgByRef + { + //TODO: make this more efficient + OptionalContentGroup *ocg = NULL; +- for (int i=0; i < optionalContentGroups->getLength(); ++i) { +- ocg = (OptionalContentGroup*)optionalContentGroups->get(i); +- if ( (ocg->ref().num == ref.num) && (ocg->ref().gen == ref.gen) ) { +- return ocg; ++ if (optionalContentGroups != NULL) ++ { ++ for (int i=0; i < optionalContentGroups->getLength(); ++i) { ++ ocg = (OptionalContentGroup*)optionalContentGroups->get(i); ++ if ( (ocg->ref().num == ref.num) && (ocg->ref().gen == ref.gen) ) { ++ return ocg; ++ } + } + } ++ ++ error(-1, "Could not find a OCG with Ref (%d:%d)", ref.num, ref.gen); ++ + // not found + return NULL; + } +@@ -208,7 +214,7 @@ bool OCGs::optContentIsVisible( Object * + } + } else if (ocg.isRef()) { + OptionalContentGroup* oc = findOcgByRef( ocg.getRef() ); +- if ( oc->state() == OptionalContentGroup::Off ) { ++ if ( !oc || oc->state() == OptionalContentGroup::Off ) { + result = false; + } else { + result = true ; +@@ -218,13 +224,10 @@ bool OCGs::optContentIsVisible( Object * + policy.free(); + } else if ( dictType.isName("OCG") ) { + OptionalContentGroup* oc = findOcgByRef( dictRef->getRef() ); +- if ( oc ) { +-// printf("Found valid group object\n"); +- if ( oc->state() == OptionalContentGroup::Off ) { +- result=false; +- } ++ if ( !oc || oc->state() == OptionalContentGroup::Off ) { ++ result=false; + } +- } ++ } + dictType.free(); + dictObj.free(); + // printf("visibility: %s\n", result? "on" : "off"); +@@ -238,7 +241,7 @@ bool OCGs::allOn( Array *ocgArray ) + ocgArray->getNF(i, &ocgItem); + if (ocgItem.isRef()) { + OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() ); +- if ( oc->state() == OptionalContentGroup::Off ) { ++ if ( oc && oc->state() == OptionalContentGroup::Off ) { + return false; + } + } +@@ -253,7 +256,7 @@ bool OCGs::allOff( Array *ocgArray ) + ocgArray->getNF(i, &ocgItem); + if (ocgItem.isRef()) { + OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() ); +- if ( oc->state() == OptionalContentGroup::On ) { ++ if ( oc && oc->state() == OptionalContentGroup::On ) { + return false; + } + } +@@ -268,7 +271,7 @@ bool OCGs::anyOn( Array *ocgArray ) + ocgArray->getNF(i, &ocgItem); + if (ocgItem.isRef()) { + OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() ); +- if ( oc->state() == OptionalContentGroup::On ) { ++ if ( oc && oc->state() == OptionalContentGroup::On ) { + return true; + } + } +@@ -283,7 +286,7 @@ bool OCGs::anyOff( Array *ocgArray ) + ocgArray->getNF(i, &ocgItem); + if (ocgItem.isRef()) { + OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() ); +- if ( oc->state() == OptionalContentGroup::Off ) { ++ if ( oc && oc->state() == OptionalContentGroup::Off ) { + return true; + } + } |