Skip to content

Commit

Permalink
Make sure number of RegExp literals to sync is at most the maximum al…
Browse files Browse the repository at this point in the history
…lowed
  • Loading branch information
Gorkem Yakin committed Apr 12, 2016
1 parent ad56276 commit d72cfaa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Parser/RegexRuntime.cpp
Expand Up @@ -2130,6 +2130,7 @@ namespace UnifiedRegex

if (matcher.literalNextSyncInputOffsets == nullptr)
{
Assert(numLiterals <= MaxNumSyncLiterals);
matcher.literalNextSyncInputOffsets =
RecyclerNewArrayLeaf(matcher.recycler, CharCount, ScannersMixin::MaxNumSyncLiterals);
}
Expand Down

0 comments on commit d72cfaa

Please sign in to comment.