[or-cvs] [tor/master] remove some dead code. some of it was tickling coverity.
arma at seul.org
arma at seul.org
Sat Oct 10 17:40:22 UTC 2009
Author: Roger Dingledine <arma at torproject.org>
Date: Sat, 10 Oct 2009 13:39:41 -0400
Subject: remove some dead code. some of it was tickling coverity.
Commit: 746a19e84d1abf2804f5b4fd8bc3353b162f854c
---
ChangeLog | 2 --
src/or/connection_edge.c | 19 -------------------
2 files changed, 0 insertions(+), 21 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 35441ae..8fd700f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,8 +25,6 @@ Changes in version 0.2.2.4-alpha - 2009-10-??
on 0.2.2.1-alpha.
- Fix two memory leaks in the error case of
circuit_build_times_parse_state. Bugfix on 0.2.2.2-alpha.
- - Make it explicit that we can't overflow in
- connection_ap_handshake_send_resolve. Bugfix on 0.0.7.1.
- Don't count one-hop circuits when we're estimating how long it
takes circuits to build on average. Otherwise we'll set our circuit
build timeout lower than we should. Bugfix on 0.2.2.2-alpha.
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 0e6297a..97d6595 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -1547,18 +1547,6 @@ connection_ap_handshake_rewrite_and_attach(edge_connection_t *conn,
uint32_t answer;
struct in_addr in;
/* Reply to resolves immediately if we can. */
- if (strlen(socks->address) > RELAY_PAYLOAD_SIZE) {
- log_warn(LD_APP,"Address to be resolved is too large. Failing.");
- control_event_client_status(LOG_WARN, "SOCKS_BAD_HOSTNAME HOSTNAME=%s",
- escaped(socks->address));
- connection_ap_handshake_socks_resolved(conn,
- RESOLVED_TYPE_ERROR_TRANSIENT,
- 0,NULL,-1,TIME_MAX);
- connection_mark_unattached_ap(conn,
- END_STREAM_REASON_SOCKSPROTOCOL |
- END_STREAM_REASON_FLAG_ALREADY_SOCKS_REPLIED);
- return -1;
- }
if (tor_inet_aton(socks->address, &in)) { /* see if it's an IP already */
/* leave it in network order */
answer = in.s_addr;
@@ -2156,13 +2144,6 @@ connection_ap_handshake_send_resolve(edge_connection_t *ap_conn)
tor_assert(payload_len <= (int)sizeof(inaddr_buf));
}
- if (payload_len > MAX_SOCKS_ADDR_LEN) {
- /* This should be impossible: we don't accept addresses this big. */
- /* XXX Should we log a bug here? */
- connection_mark_unattached_ap(ap_conn, END_STREAM_REASON_INTERNAL);
- return -1;
- }
-
log_debug(LD_APP,
"Sending relay cell to begin stream %d.", ap_conn->stream_id);
--
1.5.6.5
More information about the tor-commits
mailing list