]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add an assert before dereferencing entry_conn->socks_request
authorRobert Ransom <rransom.8774@gmail.com>
Wed, 30 Nov 2011 04:34:33 +0000 (20:34 -0800)
committerRobert Ransom <rransom.8774@gmail.com>
Wed, 30 Nov 2011 04:34:33 +0000 (20:34 -0800)
This may turn a segfault which katmagic saw into an assertion failure.

src/or/relay.c

index ac3114bda5ec7d8d52f6414fd67dbade30393153..6cf4b73a5f58514b2cd0066fc8996ab7ea7c1176 100644 (file)
@@ -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);