diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-11-30 12:41:08 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-11-30 12:41:08 -0500 |
commit | 29db095a35db715f1d84aacae24f00b54aad2507 (patch) | |
tree | a759e374f7b1a46d231eeb1691435e3ee59a4fb3 /src/common/address.c | |
parent | 9da99b4939b66b001cf73b1f12fb71c745461591 (diff) | |
parent | 3ebe960f3f734322ea3ea471ca6abceb245ca322 (diff) | |
download | tor-29db095a35db715f1d84aacae24f00b54aad2507.tar.gz tor-29db095a35db715f1d84aacae24f00b54aad2507.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/common/address.c')
-rw-r--r-- | src/common/address.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/address.c b/src/common/address.c index f40e428cce..ab056f427e 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -962,8 +962,11 @@ char * tor_dup_addr(const tor_addr_t *addr) { char buf[TOR_ADDR_BUF_LEN]; - tor_addr_to_str(buf, addr, sizeof(buf), 0); - return tor_strdup(buf); + if (tor_addr_to_str(buf, addr, sizeof(buf), 0)) { + return tor_strdup(buf); + } else { + return tor_strdup("<unknown address type>"); + } } /** Return a string representing the address <b>addr</b>. This string is |