]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Init conn->addr to "unspec" on cpuworker connections
authorNick Mathewson <nickm@torproject.org>
Fri, 2 Dec 2011 21:21:50 +0000 (16:21 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 2 Dec 2011 21:21:50 +0000 (16:21 -0500)
Fixes bug 4532 reported by "troll_un"

changes/bug4532 [new file with mode: 0644]
src/or/cpuworker.c

diff --git a/changes/bug4532 b/changes/bug4532
new file mode 100644 (file)
index 0000000..6ce4881
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes:
+    - Initialize conn->addr to a vaild state in spawn_cpuworker. Fixes bug
+      4532; found by troll_un.
index 914003790aceac8d25972c49d0462bfb3b075574..e4460c5981982a8bda3bcd5ccc99d242bd559a16 100644 (file)
@@ -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.");