Browse Source

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.
travis-debug
Rusty Russell 5 years ago
parent
commit
d119758b09
  1. 2
      gossipd/seeker.c

2
gossipd/seeker.c

@ -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…
Cancel
Save