mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Merge branch 'maint-0.2.7-redux' into maint-0.2.8
This commit is contained in:
@@ -431,9 +431,11 @@ cell_pack(packed_cell_t *dst, const cell_t *src, int wide_circ_ids)
|
||||
set_uint32(dest, htonl(src->circ_id));
|
||||
dest += 4;
|
||||
} else {
|
||||
/* Clear the last two bytes of dest, in case we can accidentally
|
||||
* send them to the network somehow. */
|
||||
memset(dest+CELL_MAX_NETWORK_SIZE-2, 0, 2);
|
||||
set_uint16(dest, htons(src->circ_id));
|
||||
dest += 2;
|
||||
memset(dest+CELL_MAX_NETWORK_SIZE-2, 0, 2); /*make sure it's clear */
|
||||
}
|
||||
set_uint8(dest, src->command);
|
||||
memcpy(dest+1, src->payload, CELL_PAYLOAD_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user