Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
podofo.35912
r1859-Fix-regression-from-r1840.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File r1859-Fix-regression-from-r1840.patch of Package podofo.35912
------------------------------------------------------------------------ r1859 | aja_ | 2017-09-03 17:37:17 +0200 (dom, 03 sep 2017) | 2 lines Fix regression from r1840: Make PdfParser::m_offsets resize only to grow Index: src/base/PdfParser.cpp =================================================================== --- src/base/PdfParser.cpp (revision 1858) +++ src/base/PdfParser.cpp (revision 1859) @@ -781,16 +781,19 @@ PODOFO_RAISE_ERROR_INFO( ePdfError_ValueOutOfRange, "xref subsection's given entry numbers together too large" ); - try { + if( nFirstObject + nNumObjects > m_nNumObjects ) + { + try { #ifdef _WIN32 - m_nNumObjects = static_cast<long>(nFirstObject + nNumObjects); - m_offsets.resize(static_cast<long>(nFirstObject+nNumObjects)); + m_nNumObjects = static_cast<long>(nFirstObject + nNumObjects); + m_offsets.resize(static_cast<long>(nFirstObject+nNumObjects)); #else - m_nNumObjects = nFirstObject + nNumObjects; - m_offsets.resize(nFirstObject+nNumObjects); + m_nNumObjects = nFirstObject + nNumObjects; + m_offsets.resize(nFirstObject+nNumObjects); #endif // _WIN32 - } catch (std::bad_alloc &ex) { - PODOFO_RAISE_ERROR( ePdfError_OutOfMemory ); + } catch (std::bad_alloc &) { + PODOFO_RAISE_ERROR( ePdfError_OutOfMemory ); + } } } else ------------------------------------------------------------------------
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