diff --git a/mozilla/js/src/jsregexp.c b/mozilla/js/src/jsregexp.c index 5a13a520c97..37e2a621ffe 100644 --- a/mozilla/js/src/jsregexp.c +++ b/mozilla/js/src/jsregexp.c @@ -2504,7 +2504,8 @@ ExecuteREBytecode(REGlobalData *gData, REMatchState *x) pc += ARG_LEN; /* start of ASSERT child */ op = (REOp) *pc++; if (REOP_IS_SIMPLE(op) && - !SimpleMatch(gData, x, op, &pc, JS_FALSE)) { + (!SimpleMatch(gData, x, op, &pc, JS_FALSE) || + pc != nextpc)) { result = NULL; break; } @@ -2524,7 +2525,8 @@ ExecuteREBytecode(REGlobalData *gData, REMatchState *x) pc += ARG_LEN; op = (REOp) *pc++; if (REOP_IS_SIMPLE(op) /* Note - fail to fail! */ && - SimpleMatch(gData, x, op, &pc, JS_FALSE)) { + SimpleMatch(gData, x, op, &pc, JS_FALSE) && + pc == nextpc) { result = NULL; break; }