[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r18354: {tor} Fix a possible cause of bug 915 when parsing multiple votes (in tor/trunk: . src/or)



Author: nickm
Date: 2009-01-31 13:27:38 -0500 (Sat, 31 Jan 2009)
New Revision: 18354

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/routerparse.c
Log:
Fix a possible cause of bug 915 when parsing multiple votes one of which was bad.  Bugfix on 0.2.0.8-alpha.

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2009-01-31 10:57:00 UTC (rev 18353)
+++ tor/trunk/ChangeLog	2009-01-31 18:27:38 UTC (rev 18354)
@@ -1,4 +1,8 @@
 Changes in version 0.2.1.12-alpha - 2009-02-??
+  o Major bugfixes:
+    - Fix an infinite-loop bug on handling corrupt votes under certain
+      circumstances.  Bugfix on 0.2.0.8-alpha.
+
   o Minor bugfixes:
     - Let controllers actually ask for the "clients_seen" event. Bugfix
       on 0.2.1.10-alpha; reported by Matt Edman.

Modified: tor/trunk/src/or/routerparse.c
===================================================================
--- tor/trunk/src/or/routerparse.c	2009-01-31 10:57:00 UTC (rev 18353)
+++ tor/trunk/src/or/routerparse.c	2009-01-31 18:27:38 UTC (rev 18354)
@@ -2167,6 +2167,9 @@
   memarea_t *area = NULL, *rs_area = NULL;
   tor_assert(s);
 
+  if (eos_out)
+    *eos_out = NULL;
+
   if (router_get_networkstatus_v3_hash(s, ns_digest)) {
     log_warn(LD_DIR, "Unable to compute digest of network-status");
     goto err;