Hello community, here is the log from the commit of package poppler checked in at Sat May 17 02:04:59 CEST 2008. -------- --- GNOME/poppler/poppler.changes 2008-04-29 11:51:59.000000000 +0200 +++ poppler/poppler.changes 2008-05-12 11:11:19.000000000 +0200 @@ -1,0 +2,6 @@ +Mon May 12 10:42:05 CEST 2008 - sbrabec@suse.cz + +- Check for optional content before using it (bnc#389090, + fdo#15899). + +------------------------------------------------------------------- New: ---- poppler-OptionalContent.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ poppler.spec ++++++ --- /var/tmp/diff_new_pack.C30275/_old 2008-05-17 02:02:10.000000000 +0200 +++ /var/tmp/diff_new_pack.C30275/_new 2008-05-17 02:02:10.000000000 +0200 @@ -13,7 +13,7 @@ Name: poppler BuildRequires: gtk-doc gtk2-devel libdrm-devel libjpeg-devel libqt4-devel libxml2-devel qt-devel qt3-devel update-desktop-files zlib-devel Version: 0.8.1 -Release: 1 +Release: 2 # Actual version of poppler-data: %define poppler_data_version 0.2.0 # WARNING: After changing versions please call Re or rpmbuild to auto-update spec file: @@ -28,6 +28,8 @@ Summary: PDF Rendering Library Source: %{name}-%{version}.tar.bz2 Source1: %{name}_spec-prepare.sh +# PATCH-FIX-UPSTREAM poppler-OptionalContent.patch bnc389090 fdo15899 sbrabec@suse.cz -- check for optional content before using it +Patch: poppler-OptionalContent.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -482,6 +484,7 @@ %prep %setup -q +%patch -p1 %build ACLOCAL="aclocal -I m4" autoreconf -f -i @@ -582,6 +585,9 @@ %{_datadir}/gtk-doc/html/poppler %changelog +* Mon May 12 2008 sbrabec@suse.cz +- Check for optional content before using it (bnc#389090, + fdo#15899). * Tue Apr 29 2008 sbrabec@suse.cz - Updated to version 0.8.1: * Do not call FT_Done_Face on a live cairo_font_face_t as it ++++++ poppler-OptionalContent.patch ++++++
From ff699e64bd1de78915aad4ddb79d6f529aef2b87 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid
Date: Sun, 11 May 2008 21:44:50 +0000 Subject: Check the OC we found exists before using it
Fixes crash http://bugs.freedesktop.org/show_bug.cgi?id=15899 --- diff --git a/poppler/OptionalContent.cc b/poppler/OptionalContent.cc index d7bf628..64621a7 100644 --- a/poppler/OptionalContent.cc +++ b/poppler/OptionalContent.cc @@ -162,12 +162,18 @@ OptionalContentGroup* OCGs::findOcgByRef( const Ref &ref) { //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 *dictRef ) } } 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 *dictRef ) 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; } } -- cgit v0.7.2-37-g538c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org