]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a bridge segfault
authorSebastian Hahn <sebastian@torproject.org>
Mon, 27 Sep 2010 21:15:43 +0000 (23:15 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Mon, 27 Sep 2010 21:19:25 +0000 (23:19 +0200)
When we enabled support to change statistic options without restarting
Tor we forgot to initialize geoip_countries. Fix that.

changes/bug1964 [new file with mode: 0644]
src/or/geoip.c

diff --git a/changes/bug1964 b/changes/bug1964
new file mode 100644 (file)
index 0000000..d100094
--- /dev/null
@@ -0,0 +1,3 @@
+  o Major bugfixes:
+    - Fix a segfault that can happen when using bridges. Fixes bug 1964;
+      bugfix on 0.2.2.15-alpha.
index 7f1052e98d17b2d64ce6d3f2b2a47086a03f95bd..ee8d72ee1def05e69cfeb6a21d73fa707881cd71 100644 (file)
@@ -254,6 +254,8 @@ geoip_get_country_by_ip(uint32_t ipaddr)
 int
 geoip_get_n_countries(void)
 {
+  if (!geoip_countries)
+    init_geoip_countries();
   return (int) smartlist_len(geoip_countries);
 }