aboutsummaryrefslogtreecommitdiff
path: root/src/lib/net/address.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2020-04-26 13:06:11 -0700
committerteor <teor@riseup.net>2020-05-07 20:38:25 +1000
commit0daa1da3ba0ba1dbf2892e042573887f430b32fd (patch)
treef6baa0918fd156d4c94afdb72d54152ee0428612 /src/lib/net/address.c
parentc76f310fe724c3d93416b4e23a219feda8e6f217 (diff)
downloadtor-0daa1da3ba0ba1dbf2892e042573887f430b32fd.tar.gz
tor-0daa1da3ba0ba1dbf2892e042573887f430b32fd.zip
Define and use TOR_ADDRPORT_BUF_LEN
Diffstat (limited to 'src/lib/net/address.c')
-rw-r--r--src/lib/net/address.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/net/address.c b/src/lib/net/address.c
index e112da9479..7f63593875 100644
--- a/src/lib/net/address.c
+++ b/src/lib/net/address.c
@@ -1188,8 +1188,7 @@ fmt_addr_impl(const tor_addr_t *addr, int decorate)
const char *
fmt_addrport(const tor_addr_t *addr, uint16_t port)
{
- /* Add space for a colon and up to 5 digits. */
- static char buf[TOR_ADDR_BUF_LEN + 6];
+ static char buf[TOR_ADDRPORT_BUF_LEN];
tor_snprintf(buf, sizeof(buf), "%s:%u", fmt_and_decorate_addr(addr), port);
return buf;
}