Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
podofo.34526
r1833-Fix-a-crash-when-passing-a-PDF-file-.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File r1833-Fix-a-crash-when-passing-a-PDF-file-.patch of Package podofo.34526
------------------------------------------------------------------------ r1833 | aja_ | 2017-03-24 19:59:20 +0100 (vie, 24 mar 2017) | 2 lines Fix a crash when passing a PDF file with an encryption dictionary reference to a nonexistent object Index: src/base/PdfParser.cpp =================================================================== --- src/base/PdfParser.cpp (revision 1832) +++ src/base/PdfParser.cpp (revision 1833) @@ -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