commit 825f3d31b1f1ec57b7321f9e05a8d027cb777c6a Author: Robert Ransom rransom.8774@gmail.com Date: Tue Nov 29 20:34:33 2011 -0800
Add an assert before dereferencing entry_conn->socks_request
This may turn a segfault which katmagic saw into an assertion failure. --- src/or/relay.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/or/relay.c b/src/or/relay.c index ac3114b..6cf4b73 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -924,6 +924,7 @@ connection_edge_process_relay_cell_not_open( } circuit_log_path(LOG_INFO,LD_APP,TO_ORIGIN_CIRCUIT(circ)); /* don't send a socks reply to transparent conns */ + tor_assert(entry_conn->socks_request != NULL); if (!entry_conn->socks_request->has_finished) connection_ap_handshake_socks_reply(entry_conn, NULL, 0, 0);