Browse Source

Fix for TextDiff complexity check.

tags/2021-05-28
jules 9 years ago
parent
commit
1884510dd7
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modules/juce_core/text/juce_TextDiff.cpp

+ 2
- 2
modules/juce_core/text/juce_TextDiff.cpp View File

@@ -29,7 +29,7 @@
struct TextDiffHelpers
{
enum { minLengthToMatch = 3,
maxLengthToScan = 128 * 1024 };
maxComplexity = 16 * 1024 * 1024 };
struct StringRegion
{
@@ -111,7 +111,7 @@ struct TextDiffHelpers
if (lenA == 0 || lenB == 0)
return 0;
if (lenA > maxLengthToScan || lenB > maxLengthToScan)
if (lenA * lenB > maxComplexity)
return findCommonSuffix (a, lenA, indexInA,
b, lenB, indexInB);


Loading…
Cancel
Save