From: Robert Ransom Date: Wed, 30 Nov 2011 04:34:33 +0000 (-0800) Subject: Add an assert before dereferencing entry_conn->socks_request X-Git-Tag: tor-0.2.3.9-alpha~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=825f3d31b1f1ec57b7321f9e05a8d027cb777c6a;p=thirdparty%2Ftor.git Add an assert before dereferencing entry_conn->socks_request This may turn a segfault which katmagic saw into an assertion failure. --- diff --git a/src/or/relay.c b/src/or/relay.c index ac3114bda5..6cf4b73a5f 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);