Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.0:Ports
podofo
0001-fix-a-crash-when-passing-a-PDF-file-with-a...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-fix-a-crash-when-passing-a-PDF-file-with-an-encryption-dictionary-ref.patch of Package podofo
Subject: Fix a crash when passing a PDF file with an encryption dictionary reference to a nonexistent object Url: https://sourceforge.net/p/podofo/code/1833/ --- a/podofo/trunk/src/base/PdfParser.cpp +++ b/podofo/trunk/src/base/PdfParser.cpp @@ -948,6 +948,14 @@ if( pEncrypt->IsReference() ) { i = pEncrypt->GetReference().ObjectNumber(); + if( i <= 0 || static_cast<size_t>( i ) >= m_offsets.size () ) + { + std::ostringstream oss; + oss << "Encryption dictionary references a nonexistent object " << pEncrypt->GetReference().ObjectNumber() << " " + << pEncrypt->GetReference().GenerationNumber(); + PODOFO_RAISE_ERROR_INFO( ePdfError_InvalidEncryptionDict, oss.str().c_str() ); + } + pObject = new PdfParserObject( m_vecObjects, m_device, m_buffer, m_offsets[i].lOffset ); if( !pObject ) PODOFO_RAISE_ERROR( ePdfError_OutOfMemory );
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