Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1
kdelibs4
bnc512559-2009-1687.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bnc512559-2009-1687.diff of Package kdelibs4
diff -ur kdelibs-4.2.98/kjs/collector.cpp kdelibs-4.2.98-cve-2009-1687/kjs/collector.cpp --- kjs/collector.cpp 2009-04-30 20:02:44.000000000 +0200 +++ kjs/collector.cpp 2009-07-26 03:52:44.000000000 +0200 @@ -31,6 +31,7 @@ #include "value.h" #include <setjmp.h> +#include <limits.h> #include <algorithm> #if PLATFORM(DARWIN) @@ -109,6 +110,9 @@ void append(CollectorBlock* block) { if (m_used == m_capacity) { + static const size_t maxNumBlocks = ULONG_MAX / sizeof(CollectorBlock*) / GROWTH_FACTOR; + if (m_capacity > maxNumBlocks) + CRASH(); m_capacity = max(MIN_ARRAY_SIZE, m_capacity * GROWTH_FACTOR); m_data = static_cast<CollectorBlock **>(fastRealloc(m_data, m_capacity * sizeof(CollectorBlock *))); }
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