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 fb585ed
Showing 1 changed file with 2 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 @@ -269,7 +270,7 @@ private static void articulationPointsRecurse(
int numT = a.initTransition(state, t);
for (int i = 0; i < numT; i++) {
a.getNextTransition(t);
if (visited.get(t.dest) == false) {
if (visited.get(t.dest) == false && d < MAX_RECURSION_DEPTH) {
parent[t.dest] = state;
articulationPointsRecurse(a, t.dest, d + 1, depth, low, parent, visited, points);
childCount++;
Expand Down

0 comments on commit fb585ed

Please sign in to comment.