Skip to content

Commit

Permalink
Add fix for LUCENE-10181
Browse files Browse the repository at this point in the history
  • Loading branch information
cfournie committed Apr 27, 2023
1 parent 0c9203a commit 8a84bd2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
*/
public final class GraphTokenStreamFiniteStrings {

private static final int MAX_RECURSION_DEPTH = 1024;
private AttributeSource[] tokens = new AttributeSource[4];
private final Automaton det;
private final Transition transition = new Transition();
Expand Down Expand Up @@ -271,7 +272,9 @@ private static void articulationPointsRecurse(
a.getNextTransition(t);
if (visited.get(t.dest) == false) {
parent[t.dest] = state;
articulationPointsRecurse(a, t.dest, d + 1, depth, low, parent, visited, points);
if (d < MAX_RECURSION_DEPTH) {
articulationPointsRecurse(a, t.dest, d + 1, depth, low, parent, visited, points);
}
childCount++;
if (low[t.dest] >= depth[state]) {
isArticulation = true;
Expand Down

0 comments on commit 8a84bd2

Please sign in to comment.