pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/poppler pull another patch from upstream CVS, to...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e6090e8847c0
branches:  trunk
changeset: 542407:e6090e8847c0
user:      drochner <drochner%pkgsrc.org@localhost>
date:      Thu May 15 17:51:29 2008 +0000

description:
pull another patch from upstream CVS, to fix a possible crash,
ride on today's PKGREVISION bump

diffstat:

 print/poppler/distinfo         |   3 +-
 print/poppler/patches/patch-ai |  89 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+), 1 deletions(-)

diffs (107 lines):

diff -r 6d2a65a50e6e -r e6090e8847c0 print/poppler/distinfo
--- a/print/poppler/distinfo    Thu May 15 17:49:49 2008 +0000
+++ b/print/poppler/distinfo    Thu May 15 17:51:29 2008 +0000
@@ -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-ab) = e3d413ec50a098af06cb2efc2fac2042064498dd
 SHA1 (patch-ag) = d1581a1ca40bba34146a4a6f4ee7d38b8f6ff3b7
 SHA1 (patch-ah) = ca50d0d8ef6da70f201cc66b0e797dde904b77e0
+SHA1 (patch-ai) = d03a8df1d32822a387f53206a21f8eba41a0c430
diff -r 6d2a65a50e6e -r e6090e8847c0 print/poppler/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/poppler/patches/patch-ai    Thu May 15 17:51:29 2008 +0000
@@ -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;
+       }
+     }



Home | Main Index | Thread Index | Old Index