diff options
author | Nick Mathewson <nickm@torproject.org> | 2021-09-14 14:19:22 -0400 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2022-02-22 19:28:33 +0000 |
commit | 358ce9a19d522d1e1cf9a119850e924ca106fec5 (patch) | |
tree | a2a6740270dc16796bf317d7ff5cf548734e595a /src/core/or/circuitbuild.c | |
parent | d057f45c6c446023eb368e8dab6b0d0a9d1c0d1d (diff) | |
download | tor-358ce9a19d522d1e1cf9a119850e924ca106fec5.tar.gz tor-358ce9a19d522d1e1cf9a119850e924ca106fec5.zip |
Add a size argument for the buffer on onion handshake functions
Diffstat (limited to 'src/core/or/circuitbuild.c')
-rw-r--r-- | src/core/or/circuitbuild.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/or/circuitbuild.c b/src/core/or/circuitbuild.c index 31e3868b65..dc8d888c97 100644 --- a/src/core/or/circuitbuild.c +++ b/src/core/or/circuitbuild.c @@ -995,7 +995,8 @@ circuit_send_first_onion_skin(origin_circuit_t *circ) len = onion_skin_create(cc.handshake_type, circ->cpath->extend_info, &circ->cpath->handshake_state, - cc.onionskin); + cc.onionskin, + sizeof(cc.onionskin)); if (len < 0) { log_warn(LD_CIRC,"onion_skin_create (first hop) failed."); return - END_CIRC_REASON_INTERNAL; @@ -1142,7 +1143,8 @@ circuit_send_intermediate_onion_skin(origin_circuit_t *circ, len = onion_skin_create(ec.create_cell.handshake_type, hop->extend_info, &hop->handshake_state, - ec.create_cell.onionskin); + ec.create_cell.onionskin, + sizeof(ec.create_cell.onionskin)); if (len < 0) { log_warn(LD_CIRC,"onion_skin_create failed."); return - END_CIRC_REASON_INTERNAL; |