diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-11-06 21:24:05 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-11-06 21:24:05 -0500 |
commit | 1c0e87f6d8c7a0abdadf1b5cd9082c10abc7f4e2 (patch) | |
tree | fd81c5f22f661779cacef205acc10c071c031211 /src/or/connection_or.c | |
parent | bfffc1f0fc7616a25c32da2eb759dade4651659e (diff) | |
download | tor-1c0e87f6d8c7a0abdadf1b5cd9082c10abc7f4e2.tar.gz tor-1c0e87f6d8c7a0abdadf1b5cd9082c10abc7f4e2.zip |
Add a pointless 2-byte memset in cell_pack
There is probably no code that can write the 2 bytes at the end of the
packed_cell_t when the cell is only a 512-byte cell, but let's not get
overconfident there.
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 11d38f8870..0775eb5c40 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -361,6 +361,7 @@ cell_pack(packed_cell_t *dst, const cell_t *src, int wide_circ_ids) } else { 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); |