mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 14:40:51 +01:00
Add an extra check in channel_send_destroy for circID==0
Prevents other cases of 12848.
This commit is contained in:
parent
b32a8b024c
commit
981e037fd3
1 changed files with 8 additions and 0 deletions
|
@ -2625,6 +2625,14 @@ channel_send_destroy(circid_t circ_id, channel_t *chan, int reason)
|
||||||
cell_t cell;
|
cell_t cell;
|
||||||
|
|
||||||
tor_assert(chan);
|
tor_assert(chan);
|
||||||
|
if (circ_id == 0) {
|
||||||
|
log_warn(LD_BUG, "Attempted to send a destroy cell for circID 0 "
|
||||||
|
"on a channel " U64_FORMAT " at %p in state %s (%d)",
|
||||||
|
U64_PRINTF_ARG(chan->global_identifier),
|
||||||
|
chan, channel_state_to_string(chan->state),
|
||||||
|
chan->state);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Check to make sure we can send on this channel first */
|
/* Check to make sure we can send on this channel first */
|
||||||
if (!(chan->state == CHANNEL_STATE_CLOSING ||
|
if (!(chan->state == CHANNEL_STATE_CLOSING ||
|
||||||
|
|
Loading…
Add table
Reference in a new issue