mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
gossipd: don't crash if we have > 7000 stale short_channel_ids.
Fixes: #3269 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: gossipd crash on huge number of unknown channels.
This commit is contained in:
parent
a3ef71b182
commit
d119758b09
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user