diff options
Diffstat (limited to 'src/or/connection_ap.c')
-rw-r--r-- | src/or/connection_ap.c | 2 |
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; } |