mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 375642: another regexp that makes JS allocate > 1GB and hand, r=mrbkap
This commit is contained in:
parent
3989847a83
commit
8b7b6c8a79
@ -2869,6 +2869,8 @@ ExecuteREBytecode(REGlobalData *gData, REMatchState *x)
|
||||
JS_ASSERT(parenIndex < gData->regexp->parenCount);
|
||||
cap = &x->parens[parenIndex];
|
||||
cap->length = x->cp - (gData->cpbegin + cap->index);
|
||||
JS_ASSERT(x->cp >= (gData->cpbegin + cap->index));
|
||||
JS_ASSERT(cap->length <= (gData->cpend - gData->cpbegin));
|
||||
op = (REOp) *pc++;
|
||||
|
||||
if (!result)
|
||||
@ -3002,6 +3004,9 @@ ExecuteREBytecode(REGlobalData *gData, REMatchState *x)
|
||||
case REOP_ENDCHILD: /* marks the end of a quantifier child */
|
||||
pc = curState[-1].continue_pc;
|
||||
op = curState[-1].continue_op;
|
||||
|
||||
if (!result)
|
||||
result = x;
|
||||
continue;
|
||||
|
||||
case REOP_REPEAT:
|
||||
|
Loading…
Reference in New Issue
Block a user