Explorar o código

Add an assert before dereferencing entry_conn->socks_request

This may turn a segfault which katmagic saw into an assertion failure.
Robert Ransom %!s(int64=12) %!d(string=hai) anos
pai
achega
825f3d31b1
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/or/relay.c

+ 1 - 0
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);