mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 736591 - Check for exceeding the operation limit when iteratively matching a global regexp against a string. r=luke
--HG-- extra : rebase_source : 2a24b4a15909cfd2c04347b60131175fe77e83fe
This commit is contained in:
parent
06b198494d
commit
6acfc155bf
@ -1560,6 +1560,8 @@ DoMatch(JSContext *cx, RegExpStatics *res, JSString *str, RegExpShared &re,
|
||||
if (re.global()) {
|
||||
RegExpExecType type = (flags & TEST_GLOBAL_BIT) ? RegExpTest : RegExpExec;
|
||||
for (size_t count = 0, i = 0, length = str->length(); i <= length; ++count) {
|
||||
if (!JS_CHECK_OPERATION_LIMIT(cx))
|
||||
return false;
|
||||
if (!ExecuteRegExp(cx, res, re, linearStr, chars, length, &i, type, rval))
|
||||
return false;
|
||||
if (!Matched(type, *rval))
|
||||
|
Loading…
Reference in New Issue
Block a user