GenericRegex: don't throw/abort on syntax error (unclosed parenthesis).
This commit is contained in:
parent
30d92a6399
commit
be96f4d7fb
@ -395,8 +395,7 @@ private:
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
default:
|
case kOneOrMore:
|
||||||
RAPIDJSON_ASSERT(op == kOneOrMore);
|
|
||||||
if (operandStack.GetSize() >= sizeof(Frag)) {
|
if (operandStack.GetSize() >= sizeof(Frag)) {
|
||||||
Frag e = *operandStack.template Pop<Frag>(1);
|
Frag e = *operandStack.template Pop<Frag>(1);
|
||||||
SizeType s = NewState(kRegexInvalidState, e.start, 0);
|
SizeType s = NewState(kRegexInvalidState, e.start, 0);
|
||||||
@ -405,6 +404,10 @@ private:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// syntax error (e.g. unclosed kLeftParenthesis)
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user