summaryrefslogtreecommitdiff
path: root/src/or/connection_ap.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-03-11 21:38:38 +0000
committerNick Mathewson <nickm@torproject.org>2003-03-11 21:38:38 +0000
commite3368a65a9176b370a6ce2e2a281a55708300cbf (patch)
treed25ed62258d93fc14a76476143e1d5812864a05b /src/or/connection_ap.c
parent1c8279ca39182fab21548b39c9405446e636de2a (diff)
downloadtor-e3368a65a9176b370a6ce2e2a281a55708300cbf.tar.gz
tor-e3368a65a9176b370a6ce2e2a281a55708300cbf.zip
Make ACI anti-collision logic work; make sure that cells are filled with 0s.
svn:r176
Diffstat (limited to 'src/or/connection_ap.c')
-rw-r--r--src/or/connection_ap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/connection_ap.c b/src/or/connection_ap.c
index 43bf960c6a..9d28d5a4a9 100644
--- a/src/or/connection_ap.c
+++ b/src/or/connection_ap.c
@@ -314,6 +314,8 @@ int ap_handshake_send_onion(connection_t *ap_conn, connection_t *n_conn, circuit
} else { /* last cell */
cell.length = dataleft;
memcpy(cell.payload, tmpbuf + tmpbuflen - dataleft, dataleft);
+ /* fill extra space with 0 bytes */
+ memset(cell.payload + dataleft, 0, CELL_PAYLOAD_SIZE - dataleft);
connection_write_cell_to_buf(&cell, n_conn);
dataleft = 0;
}