Skip to content

Commit e819f5b

Browse files
committed
askrene: bugfix queue overflow
Changelog-none Signed-off-by: Lagrang3 <[email protected]>
1 parent f00c63f commit e819f5b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/askrene/algorithm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ bool BFS_path(const tal_t *ctx, const struct graph *graph,
5656
const struct node next = arc_head(graph, arc);
5757

5858
/* if that node has been seen previously */
59-
if (prev[next.idx].idx != INVALID_INDEX)
59+
if (prev[next.idx].idx != INVALID_INDEX ||
60+
next.idx == source.idx)
6061
continue;
6162

6263
prev[next.idx] = arc;

0 commit comments

Comments
 (0)