[tor-commits] [tor/master] Init conn->addr to "unspec" on cpuworker connections
nickm at torproject.org
nickm at torproject.org
Fri Dec 2 21:19:31 UTC 2011
commit 5303918091d832d2986b113d60a6ba1ca328af1c
Author: Nick Mathewson <nickm at torproject.org>
Date: Fri Dec 2 16:21:50 2011 -0500
Init conn->addr to "unspec" on cpuworker connections
Fixes bug 4532 reported by "troll_un"
---
changes/bug4532 | 3 +++
src/or/cpuworker.c | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/changes/bug4532 b/changes/bug4532
new file mode 100644
index 0000000..6ce4881
--- /dev/null
+++ b/changes/bug4532
@@ -0,0 +1,3 @@
+ o Minor bugfixes:
+ - Initialize conn->addr to a vaild state in spawn_cpuworker. Fixes bug
+ 4532; found by troll_un.
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 9140037..e4460c5 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -347,6 +347,7 @@ spawn_cpuworker(void)
/* set up conn so it's got all the data we need to remember */
conn->s = fd;
conn->address = tor_strdup("localhost");
+ tor_addr_make_unspec(&conn->addr);
if (connection_add(conn) < 0) { /* no space, forget it */
log_warn(LD_NET,"connection_add for cpuworker failed. Giving up.");
More information about the tor-commits
mailing list