summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/connection_edge.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index f25202725e..0e6297a50a 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -2156,8 +2156,9 @@ connection_ap_handshake_send_resolve(edge_connection_t *ap_conn)
tor_assert(payload_len <= (int)sizeof(inaddr_buf));
}
- if (payload_len > RELAY_PAYLOAD_SIZE) {
+ 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;
}