]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Don't crash when reading cached*consensus files on startup
authorSebastian Hahn <sebastian@torproject.org>
Thu, 10 Jun 2010 14:18:26 +0000 (16:18 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Thu, 10 Jun 2010 14:18:26 +0000 (16:18 +0200)
Fixes bug 1352

changes/bug1532 [new file with mode: 0644]
src/or/dirserv.c

diff --git a/changes/bug1532 b/changes/bug1532
new file mode 100644 (file)
index 0000000..ed26904
--- /dev/null
@@ -0,0 +1,4 @@
+ o Major bugfixes
+   - Tor directory authorities no longer crash when started with a
+     cached-microdesc-consensus file in their data directory. Bugfix on
+     0.2.2.6-alpha, fixes bug 1532.
index 8b215011f3385e09722b8805fc6c1eca22b9d805..24b4d5483b86a653fb53f3b934c62ba74cc876ce 100644 (file)
@@ -1597,6 +1597,8 @@ dirserv_get_runningrouters(void)
 cached_dir_t *
 dirserv_get_consensus(const char *flavor_name)
 {
+  if (!cached_consensuses)
+    return NULL;
   return strmap_get(cached_consensuses, flavor_name);
 }