head 1.8; access; symbols pkgsrc-2013Q2:1.8.0.6 pkgsrc-2013Q2-base:1.8 pkgsrc-2012Q4:1.8.0.4 pkgsrc-2012Q4-base:1.8 pkgsrc-2011Q4:1.8.0.2 pkgsrc-2011Q4-base:1.8 pkgsrc-2011Q2:1.7.0.4 pkgsrc-2011Q2-base:1.7 pkgsrc-2011Q1:1.7.0.2 pkgsrc-2011Q1-base:1.7 pkgsrc-2010Q3:1.5.0.2 pkgsrc-2010Q3-base:1.5 pkgsrc-2009Q4:1.4.0.2 pkgsrc-2009Q4-base:1.4; locks; strict; comment @# @; 1.8 date 2011.07.11.10.05.22; author drochner; state dead; branches; next 1.7; 1.7 date 2011.03.09.12.07.12; author drochner; state Exp; branches; next 1.6; 1.6 date 2010.11.02.15.45.12; author drochner; state dead; branches; next 1.5; 1.5 date 2010.10.01.21.32.34; author spz; state Exp; branches; next 1.4; 1.4 date 2009.11.20.11.20.12; author drochner; state dead; branches; next 1.3; 1.3 date 2009.10.21.10.18.57; author drochner; state Exp; branches; next 1.2; 1.2 date 2009.03.19.12.12.24; author drochner; state dead; branches; next 1.1; 1.1 date 2009.02.26.20.23.02; author drochner; state Exp; branches; next ; desc @@ 1.8 log @update to 0.16.7 changes: bugfixes pkgsrc change: set --enable-cms in frontend components if it was set in the base pkg -- the layout of some classes depends on this definition, and inconsistencies can lead to crashes (see poppler bug #35381) @ text @$NetBSD: patch-ba,v 1.7 2011/03/09 12:07:12 drochner Exp $ --- poppler/Annot.cc.orig 2011-02-27 10:54:37.000000000 +0000 +++ poppler/Annot.cc @@@@ -790,22 +790,22 @@@@ AnnotAppearanceCharacs::AnnotAppearanceC } obj1.free(); - if (dict->lookup("CA", &obj1)->isName()) { - normalCaption = new GooString(obj1.getName()); + if (dict->lookup("CA", &obj1)->isString()) { + normalCaption = new GooString(obj1.getString()); } else { normalCaption = NULL; } obj1.free(); - if (dict->lookup("RC", &obj1)->isName()) { - rolloverCaption = new GooString(obj1.getName()); + if (dict->lookup("RC", &obj1)->isString()) { + rolloverCaption = new GooString(obj1.getString()); } else { rolloverCaption = NULL; } obj1.free(); - if (dict->lookup("AC", &obj1)->isName()) { - alternateCaption = new GooString(obj1.getName()); + if (dict->lookup("AC", &obj1)->isString()) { + alternateCaption = new GooString(obj1.getString()); } else { alternateCaption = NULL; } @ 1.7 log @update to 0.16.3 changes: -Increase precision in PS output device -bugfixes (shlib name changed) @ text @d1 1 a1 1 $NetBSD$ @ 1.6 log @update to 0.14.4 changes: -bugfixes (in particular for security issues which were patched in pkgsrc) -fixed memory leaks @ text @d1 1 a1 1 $NetBSD: patch-ba,v 1.5 2010/10/01 21:32:34 spz Exp $ d3 5 a7 11 security fixes for http://secunia.com/advisories/41596/ taken from http://cgit.freedesktop.org/poppler - Fix memory leak if obj2 is not a dict - Avoid loops in Form::fieldLookup --- poppler/Form.cc.orig 2010-06-08 20:06:31.000000000 +0000 +++ poppler/Form.cc @@@@ -22,6 +22,7 @@@@ #pragma implementation #endif d9 8 a16 23 +#include #include #include #include "goo/gmem.h" @@@@ -715,13 +716,14 @@@@ FormField::FormField(XRef* xrefA, Object // Load children for(int i=0; iget(i, &obj2); - array->getNF(i, &childRef); if (!obj2.isDict ()) { error (-1, "Reference to an invalid or non existant object"); + obj2.free(); continue; } + Object childRef; + array->getNF(i, &childRef); //field child if (dict->lookup ("FT", &obj3)->isName()) { // If I'm not a generic container field and my children @@@@ -1180,7 +1182,7 @@@@ Form::~Form() { } d18 8 a25 5 // Look up an inheritable field dictionary entry. -Object *Form::fieldLookup(Dict *field, char *key, Object *obj) { +static Object *fieldLookup(Dict *field, char *key, Object *obj, std::set *usedParents) { Dict *dict; Object parent; d27 4 a30 23 @@@@ -1189,8 +1191,23 @@@@ Object *Form::fieldLookup(Dict *field, c return obj; } obj->free(); - if (dict->lookup("Parent", &parent)->isDict()) { - fieldLookup(parent.getDict(), key, obj); + dict->lookupNF("Parent", &parent); + if (parent.isRef()) { + const Ref ref = parent.getRef(); + if (usedParents->find(ref.num) == usedParents->end()) { + usedParents->insert(ref.num); + + Object obj2; + parent.fetch(dict->getXRef(), &obj2); + if (obj2.isDict()) { + fieldLookup(obj2.getDict(), key, obj, usedParents); + } else { + obj->initNull(); + } + obj2.free(); + } + } else if (parent.isDict()) { + fieldLookup(parent.getDict(), key, obj, usedParents); d32 1 a32 1 obj->initNull(); a33 12 @@@@ -1198,6 +1215,11 @@@@ Object *Form::fieldLookup(Dict *field, c return obj; } +Object *Form::fieldLookup(Dict *field, char *key, Object *obj) { + std::set usedParents; + return ::fieldLookup(field, key, obj, &usedParents); +} + FormField *Form::createFieldFromDict (Object* obj, XRef *xrefA, const Ref& pref) { Object obj2; @ 1.5 log @security fixes from and for http://secunia.com/advisories/41596/ plus the necessary backporting to poppler-0.14.2 (and a pkgrev bump): poppler/Form.cc http://cgit.freedesktop.org/poppler/poppler/commit/?id=473de6f88a055bb03470b4af5fa584be8cb5fda4 Fix memory leak if obj2 is not a dict poppler/Dict.h poppler/Form.cc http://cgit.freedesktop.org/poppler/poppler/commit/?id=d2578bd66129466b2dd114b6407c147598e09d2b Avoid loops in Form::fieldLookup poppler/Stream.cc http://cgit.freedesktop.org/poppler/poppler/commit/?id=c6a091512745771894b54a71613fd6b5ca1adcb3 Fix memory leak fofi/FoFiType1.cc http://cgit.freedesktop.org/poppler/poppler/commit/?id=39d140bfc0b8239bdd96d6a55842034ae5c05473 Fix crash in broken pdf (code < 0) poppler/Decrypt.cc http://cgit.freedesktop.org/poppler/poppler/commit/?id=a2dab0238a69240dad08eca2083110b52ce488b7 Initialize properly charactersRead poppler/Gfx.cc http://cgit.freedesktop.org/poppler/poppler/commit/?id=2fe825deac055be82b220d0127169cb3d61387a8 Make sure obj1 is a num before reading it poppler/Gfx.cc http://cgit.freedesktop.org/poppler/poppler/commit/?id=3422638b2a39cbdd33a114a7d7debc0a5f688501 Fix crash in broken pdf (parser->getStream() is 0) poppler/Gfx.cc http://cgit.freedesktop.org/poppler/poppler/commit/?id=e853106b58d6b4b0467dbd6436c9bb1cfbd372cf Properly initialize parser poppler/Gfx.cc http://cgit.freedesktop.org/poppler/poppler/commit/?id=dfdf3602bde47d1be7788a44722c258bfa0c6d6e Give a value to color.c[i] poppler/Function.cc http://cgit.freedesktop.org/poppler/poppler/commit/?id=bf2055088a3a2d3bb3d3c37d464954ec1a25771f Properly initialize stack poppler/Function.cc http://cgit.freedesktop.org/poppler/poppler/commit/?id=26a5817ffec9f05ac63db6c5cd5b1f0871d271c7 Fix crash when idx is out of range @ text @d1 1 a1 1 $NetBSD$ @ 1.4 log @update to 0.12.2 changes: minor bugfixes (also fix for CVE-2009-3607 which was patched in pkgsrc) @ text @d1 1 a1 1 $NetBSD: patch-ba,v 1.3 2009/10/21 10:18:57 drochner Exp $ d3 27 a29 5 --- poppler/PSOutputDev.cc.orig 2009-10-05 00:40:39.000000000 +0200 +++ poppler/PSOutputDev.cc @@@@ -3163,6 +3163,7 @@@@ void PSOutputDev::startPage(int pageNum, } else { writePSFmt("%%Page: {0:t} {1:d}\n", filteredString, seqPage); d31 52 a82 4 + delete filteredString; } else { writePSFmt("%%Page: {0:d} {1:d}\n", pageNum, seqPage); } @ 1.3 log @update to 0.12.1 changes: -Security fixes from xpdf 3.02pl4 -bugfixes -qt4 API improvements pkgsrc change: add patch for CVE-2009-3607 (integer overflow in create_surface_from_thumbnail_data) @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @update to 0.10.5 Changes since 0.10.4: core: * Read the UF entry if present and prefer it over F in Filespec dictionary * Fix typo that was making CairoOutputDev crash on some files. Bug #17337 * Make JBIG2Stream more robust to corrupt input data * Do not blindly follow loops parsing OutlineItem. Bug #18364 * Set up the error manager before calling jpeg_create_decompress. Bug #20484 * Check there is an optional content config before using it. Bug #20587 * Fix rendering of some PDF with OpenType fonts. Bug #20605 build system: * Yet more support for build on windows * Use AC_CHECK_HEADER to find headers. Bug #20538 * Check for pkgconfig before using it * General autotools improvements @ text @d1 1 a1 1 $NetBSD: patch-ba,v 1.1 2009/02/26 20:23:02 drochner Exp $ d3 10 a12 11 --- poppler/CairoOutputDev.cc.orig 2009-02-24 15:34:03.000000000 +0100 +++ poppler/CairoOutputDev.cc @@@@ -236,7 +236,7 @@@@ void CairoOutputDev::setDefaultCTM(doubl matrix.y0 = ctm[5]; cairo_transform (cairo, &matrix); - if (shape) + if (cairo_shape) cairo_transform (cairo_shape, &matrix); OutputDev::setDefaultCTM(ctm); @ 1.1 log @pull some patches from upstream, to fix two crashes and an off-by-one in color management support, bump PKGREVISION @ text @d1 1 a1 1 $NetBSD$ @