Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
podofo.34526
r1648-Be-forgiving-when-reading-XRef-stream-con...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File r1648-Be-forgiving-when-reading-XRef-stream-content.patch of Package podofo.34526
------------------------------------------------------------------------ r1648 | aja_ | 2014-06-30 22:07:17 +0200 (lun, 30 jun 2014) | 7 lines Be forgiving when reading XRef stream content Just ignore ePdfError_NoNumber errors when reading XRef stream content, which might happen for example when the stream points to an offset where doesn't start any object. It might partly return behaviour before r1587. Index: src/base/PdfParser.cpp =================================================================== --- src/base/PdfParser.cpp (revision 1647) +++ src/base/PdfParser.cpp (revision 1648) @@ -836,8 +836,18 @@ // Check for a previous XRef stream if(xrefObject.HasPrevious()) { - m_nIncrementalUpdates++; - this->ReadXRefStreamContents( xrefObject.GetPreviousOffset(), bReadOnlyTrailer ); + try { + m_nIncrementalUpdates++; + this->ReadXRefStreamContents( xrefObject.GetPreviousOffset(), bReadOnlyTrailer ); + } catch(PdfError &e) { + /* Be forgiving, the error happens when an entry in XRef stream points + to a wrong place (offset) in the PDF file. */ + if( e != ePdfError_NoNumber ) + { + e.AddToCallstack( __FILE__, __LINE__ ); + throw e; + } + } } } ------------------------------------------------------------------------
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor