summaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/relay/dns.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 701719af95..5213296992 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -586,8 +586,11 @@ send_resolved_hostname_cell,(edge_connection_t *conn,
char buf[RELAY_PAYLOAD_SIZE];
size_t buflen;
uint32_t ttl;
+
+ if (BUG(!hostname))
+ return;
+
size_t namelen = strlen(hostname);
- tor_assert(hostname);
tor_assert(namelen < 256);
ttl = dns_clip_ttl(conn->address_ttl);