Hi!
Thanks for your patch! I commited it to SVN!
Regards,
Dom
On Monday, May 30, 2011 09:41:49 pm Even Rouault wrote:
> Hi,
>
> A few PDFs, such as http://www.agc.army.mil/GeoPDFgallery/3D/Seattle.pdf ,
> generate the following segfault when running podofopdfinfo :
>
> ==7589== Process terminating with default action of signal 11 (SIGSEGV)
> ==7589== Access not within mapped region at address 0x18
> ==7589== at 0x48BF66: PoDoFo::PdfVariant::DelayedLoad() const
> (PdfVariant.h:530)
> ==7589== by 0x4BAE51: PoDoFo::PdfVariant::GetArray() (PdfVariant.h:758)
> ==7589== by 0x4E404D:
> PoDoFo::PdfNamesTree::AddToDictionary(PoDoFo::PdfObject*,
> PoDoFo::PdfDictionary&) (PdfNamesTree.cpp:481)
> ==7589== by 0x4E3E0D: PoDoFo::PdfNamesTree::ToDictionary(PoDoFo::PdfName
> const&, PoDoFo::PdfDictionary&) (PdfNamesTree.cpp:456)
> ==7589== by 0x4874E1: PdfInfo::OutputOneName(std::ostream&,
> PoDoFo::PdfNamesTree*, std::string const&, std::string const&)
> (pdfinfo.cpp:170)
> ==7589== by 0x48782B: PdfInfo::OutputNames(std::ostream&)
> (pdfinfo.cpp:191) ==7589== by 0x48A14E: main (podofopdfinfo.cpp:147)
>
> The following patch fixes that segfault :
>
> Index: src/doc/PdfNamesTree.cpp
> ===================================================================
> --- src/doc/PdfNamesTree.cpp (revision 1462)
> +++ src/doc/PdfNamesTree.cpp (working copy)
> @@ -476,7 +476,7 @@
> ++it;
> }
> }
> - else
> + else if( pObj->GetDictionary().HasKey("Names") )
> {
> const PdfArray & names =
> pObj->GetDictionary().GetKey("Names")-
>
> >GetArray();
>
> PdfArray::const_iterator it = names.begin();
>
> Best regards,
>
> Even
>
> ---------------------------------------------------------------------------
> --- vRanger cuts backup time in half-while increasing security.
> With the market-leading solution for virtual backup and recovery,
> you get blazing-fast, flexible, and affordable data protection.
> Download your free trial now.
> http://p.sf.net/sfu/quest-d2dcopy1
> _______________________________________________
> Podofo-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/podofo-users
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users