]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Do not pass NULL to log(%s) in dir_server_new.
authorNick Mathewson <nickm@torproject.org>
Mon, 22 Aug 2016 05:22:19 +0000 (01:22 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 22 Aug 2016 05:22:19 +0000 (01:22 -0400)
This bug had existed since 0.2.4.7-alpha, but now that we have
FallbackDirs by default, it actually matters.

Fixes bug 19947; bugfix on 0.2.4.7-alpha or maybe 0.2.8.1-alpha.

Rubiate wrote the patch; teor wrote the changes file.

changes/bug19947 [new file with mode: 0644]
src/or/routerlist.c

diff --git a/changes/bug19947 b/changes/bug19947
new file mode 100644 (file)
index 0000000..b9dce8b
--- /dev/null
@@ -0,0 +1,4 @@
+ o Minor bugfixes (fallback directories):
+    - Avoid logging a NULL string pointer when loading fallback directory information.
+      Fixes bug 19947; bugfix on 0.2.4.7-alpha and 0.2.8.1-alpha.
+      Report and patch by "rubiate".
index 620c32d6410b92c89fa0b0cb4b9725d145cc368f..c3588726f78cb32a495dd49590e7074a0ab9ef5e 100644 (file)
@@ -4337,10 +4337,10 @@ dir_server_new(int is_authority,
 
   if (nickname)
     tor_asprintf(&ent->description, "directory server \"%s\" at %s:%d",
-                 nickname, hostname, (int)dir_port);
+                 nickname, hostname_, (int)dir_port);
   else
     tor_asprintf(&ent->description, "directory server at %s:%d",
-                 hostname, (int)dir_port);
+                 hostname_, (int)dir_port);
 
   ent->fake_status.addr = ent->addr;
   tor_addr_copy(&ent->fake_status.ipv6_addr, &ent->ipv6_addr);