mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-10 01:24:30 +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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user