Ver código fonte

Make sure number of RegExp literals to sync is at most the maximum allowed

Gorkem Yakin 10 anos atrás
pai
commit
d72cfaa5cc
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      lib/Parser/RegexRuntime.cpp

+ 1 - 0
lib/Parser/RegexRuntime.cpp

@@ -2130,6 +2130,7 @@ namespace UnifiedRegex
 
         if (matcher.literalNextSyncInputOffsets == nullptr)
         {
+            Assert(numLiterals <= MaxNumSyncLiterals);
             matcher.literalNextSyncInputOffsets =
                 RecyclerNewArrayLeaf(matcher.recycler, CharCount, ScannersMixin::MaxNumSyncLiterals);
         }