aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/address.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/address.c b/src/common/address.c
index 1c725393d9..7fc7301051 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -958,8 +958,10 @@ fmt_addr(const tor_addr_t *addr)
{
static char buf[TOR_ADDR_BUF_LEN];
if (!addr) return "<null>";
- tor_addr_to_str(buf, addr, sizeof(buf), 0);
- return buf;
+ if (tor_addr_to_str(buf, addr, sizeof(buf), 0))
+ return buf;
+ else
+ return "???";
}
/** Convert the string in <b>src</b> to a tor_addr_t <b>addr</b>. The string