[tor-commits] [tor/master] Fix a copy-and-paste issue found by coverity

nickm at torproject.org nickm at torproject.org
Mon Feb 11 20:24:24 UTC 2013


commit b9432becbe0ff10788e8f289b6562720822b7ece
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Feb 11 14:42:33 2013 -0500

    Fix a copy-and-paste issue found by coverity
    
    Fixes CID 980650; bugfix on 0.2.4.10-alpha.
---
 changes/cov980650  |    4 ++++
 src/or/routerset.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/changes/cov980650 b/changes/cov980650
new file mode 100644
index 0000000..cbbada2
--- /dev/null
+++ b/changes/cov980650
@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+    - Fix a copy-and-paste error when adding a missing A1 to a routerset
+      because of GeoIPExcludeUnknown. Fix for coverity CID 980650.
+      Bugfix on 0.2.4.10-alpha.
diff --git a/src/or/routerset.c b/src/or/routerset.c
index e45516b..1eca5b6 100644
--- a/src/or/routerset.c
+++ b/src/or/routerset.c
@@ -255,7 +255,7 @@ routerset_add_unknown_ccs(routerset_t **setp, int only_if_some_cc_set)
   }
   if (add_a1) {
     smartlist_add(set->country_names, tor_strdup("a1"));
-    smartlist_add(set->country_names, tor_strdup("{a1}"));
+    smartlist_add(set->list, tor_strdup("{a1}"));
   }
 
   if (add_unknown || add_a1) {





More information about the tor-commits mailing list