aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorFrancisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>2014-12-23 12:55:48 -0500
committerNick Mathewson <nickm@torproject.org>2014-12-23 12:55:48 -0500
commitc83f18011697d3b3c3434464280271697f79d20a (patch)
tree70308270179bc8d60529c5832d591ff63206dfc0 /src/or
parent184a2dbbdd27f958f5ac290fe030d1fac2959157 (diff)
downloadtor-c83f18011697d3b3c3434464280271697f79d20a.tar.gz
tor-c83f18011697d3b3c3434464280271697f79d20a.zip
Fix Matthews code to actually use tmp
Matthew's autoaddr code returned an undecorated address when trying to check that the code didn't insert an undecorated one into the map. This patch fixes this by actually storing the undecorated address in tmp instead of buf as it was originally intended. This patch is released under the same license as the original file as long as the author iscredited. Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
Diffstat (limited to 'src/or')
-rw-r--r--src/or/addressmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/addressmap.c b/src/or/addressmap.c
index 998770a3db..9062d76eed 100644
--- a/src/or/addressmap.c
+++ b/src/or/addressmap.c
@@ -888,7 +888,7 @@ addressmap_get_virtual_address(int type)
/* XXXX This code is to make sure I didn't add an undecorated version
* by mistake. I hope it's needless. */
char tmp[TOR_ADDR_BUF_LEN];
- tor_addr_to_str(buf, &addr, sizeof(tmp), 0);
+ tor_addr_to_str(tmp, &addr, sizeof(tmp), 0);
if (strmap_get(addressmap, tmp)) {
log_warn(LD_BUG, "%s wasn't in the addressmap, but %s was.",
buf, tmp);