Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
podofo.34526
r1921-m_offsets-resize-can-throw-std-length_err...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File r1921-m_offsets-resize-can-throw-std-length_error-as-well-as-std-bad_alloc.patch of Package podofo.34526
------------------------------------------------------------------------ r1921 | domseichter | 2018-04-14 09:47:38 +0200 (sáb, 14 abr 2018) | 1 line FIXED by Mark Rogers: m_offsets.resize() can throw std::length_error as well as std::bad_alloc. Index: src/base/PdfParser.cpp =================================================================== --- src/base/PdfParser.cpp (revision 1920) +++ src/base/PdfParser.cpp (revision 1921) @@ -805,7 +805,13 @@ m_nNumObjects = nFirstObject + nNumObjects; m_offsets.resize(nFirstObject+nNumObjects); #endif // _WIN32 - } catch (std::bad_alloc &) { + } catch (std::exception &) { + // If m_nNumObjects*sizeof(TXRefEntry) > std::numeric_limits<size_t>::max() then + // resize() throws std::length_error, for smaller allocations that fail it may throw + // std::bad_alloc (implementation-dependent). "20.5.5.12 Restrictions on exception + // handling" in the C++ Standard says any function that throws an exception is allowed + // to throw implementation-defined exceptions derived the base type (std::exception) + // so we need to catch all std::exceptions here 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