Commit c75cf802 authored by Nick Mathewson's avatar Nick Mathewson 🐚
Browse files

Merge branch 'ticket28879' into maint-0.3.5

parents abdc6aed 16199a54
Loading
Loading
Loading
Loading

changes/ticket28879

0 → 100644
+5 −0
Original line number Diff line number Diff line
  o Minor bugfixes (correctness):
    - Fix an unreached code-path where we checked the value of "hostname"
      inside send_resolved_hostnam_cell(). Previously, we used it before
      checking it; now we check it first. Fixes bug 28879; bugfix on
      0.1.2.7-alpha.
+4 −1
Original line number Diff line number Diff line
@@ -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);