diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-08-03 16:04:25 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-08 20:29:34 -0400 |
commit | a561a10da726b426d326515ca7f75988b405bab7 (patch) | |
tree | d0b7089e76d3a2f8ed9db8d26ff025c53e88b4be /src/or/hs_circuit.c | |
parent | 2c6f2e9be9db6d3889a0756be93d7203888eaa72 (diff) | |
download | tor-a561a10da726b426d326515ca7f75988b405bab7.tar.gz tor-a561a10da726b426d326515ca7f75988b405bab7.zip |
Fix small easy bugs all around
- Fix log message format string.
- Do extra circuit purpose check.
- wipe memory in a clear function
- Make sure we don't double add intro points in our list
- Make sure we don't double close intro circuits.
- s/tt_u64_op/tt_i64_op/
Diffstat (limited to 'src/or/hs_circuit.c')
-rw-r--r-- | src/or/hs_circuit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/hs_circuit.c b/src/or/hs_circuit.c index 75c946799f..527439599a 100644 --- a/src/or/hs_circuit.c +++ b/src/or/hs_circuit.c @@ -898,6 +898,10 @@ hs_circ_handle_intro_established(const hs_service_t *service, tor_assert(circ); tor_assert(payload); + if (BUG(TO_CIRCUIT(circ)->purpose != CIRCUIT_PURPOSE_S_ESTABLISH_INTRO)) { + goto done; + } + /* Try to parse the payload into a cell making sure we do actually have a * valid cell. For a legacy node, it's an empty payload so as long as we * have the cell, we are good. */ |