зеркало из https://github.com/mozilla/pjs.git
Bug 375642: another regexp that makes JS allocate > 1GB and hand, r=mrbkap
This commit is contained in:
Родитель
aff4d55f08
Коммит
4eceb88393
|
@ -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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче