Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.3:Update
kdelibs4
kjs-stacklimit.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kjs-stacklimit.diff of Package kdelibs4
commit ffc8a6a316cacc8df6a91584653fe2c867a5d489 Author: Bernd Buschinski <b.buschinski@googlemail.com> Date: Fri Mar 29 21:26:40 2013 +0100 kjs: Avoid overflow computing availableStackSize in KJS::RegExp::match REVIEW:109555 BUG:316923 diff --git a/kjs/regexp.cpp b/kjs/regexp.cpp index 5294d62..3622194 100644 --- a/kjs/regexp.cpp +++ b/kjs/regexp.cpp @@ -258,7 +258,12 @@ static bool sanitizePatternExtensions(UString &p, WTF::Vector<int>* parenIdx) bool RegExp::tryGrowingMaxStackSize = true; bool RegExp::didIncreaseMaxStackSize = false; + +#if HAVE(SYS_TIME_H) +rlim_t RegExp::availableStackSize = 8*1024*1024; +#else int RegExp::availableStackSize = 8*1024*1024; +#endif RegExp::RegExp(const UString &p, char flags) : _pat(p), _flags(flags), _valid(true), _numSubPatterns(0) diff --git a/kjs/regexp.h b/kjs/regexp.h index f6132e6..67446fc 100644 --- a/kjs/regexp.h +++ b/kjs/regexp.h @@ -36,6 +36,13 @@ extern "C" { // bug with some libc5 distributions } #endif //HAVE_PCREPOSIX +#if defined _WIN32 || defined _WIN64 +#undef HAVE_SYS_TIME_H +#endif +#if HAVE(SYS_TIME_H) +#include <sys/resource.h> +#endif + #include "ustring.h" namespace KJS { @@ -81,7 +88,11 @@ namespace KJS { static bool tryGrowingMaxStackSize; static bool didIncreaseMaxStackSize; +#if HAVE(SYS_TIME_H) + static rlim_t availableStackSize; +#else static int availableStackSize; +#endif private: #ifdef HAVE_PCREPOSIX pcre *_regex;
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