Skip to content

Commit

Permalink
gossipd: don't crash if we have > 7000 stale short_channel_ids.
Browse files Browse the repository at this point in the history
Fixes: #3269
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Nov 19, 2019
1 parent dda792c commit ce421fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gossipd/seeker.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ static struct short_channel_id *stale_scids_remove(const tal_t *ctx,
uintmap_del(&seeker->stale_scids, scid);
tal_free(qf);
i++;
if (i == max)
break;
}
tal_resize(&scids, i);
tal_resize(query_flags, i);
Expand Down

0 comments on commit ce421fa

Please sign in to comment.