diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-06-27 11:04:44 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-06-27 11:04:44 -0400 |
commit | 3de27618e65affe3688a5d92bce96e1e4ed5a82a (patch) | |
tree | 50ece08f25aebbcbce9294be8df2ae8c8254befb /src | |
parent | 3913f959e3688cfa91f9fab5368ba149e00cfec6 (diff) | |
parent | ccae991662adb3b64bdb1dcd4a942e4d1e163414 (diff) | |
download | tor-3de27618e65affe3688a5d92bce96e1e4ed5a82a.tar.gz tor-3de27618e65affe3688a5d92bce96e1e4ed5a82a.zip |
Merge branch 'maint-0.2.5' into maint-0.2.6
Diffstat (limited to 'src')
-rw-r--r-- | src/or/connection_or.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index e0dff1c915..09c9b7c27f 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -429,9 +429,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); |