[or-cvs] r10159: Backport 10052+10053: avoid rare memory corruption on dirser (in tor/branches/tor-0_1_2-patches: . src/or)

nickm at seul.org nickm at seul.org
Thu May 10 19:29:37 UTC 2007


Author: nickm
Date: 2007-05-10 15:29:32 -0400 (Thu, 10 May 2007)
New Revision: 10159

Modified:
   tor/branches/tor-0_1_2-patches/
   tor/branches/tor-0_1_2-patches/ChangeLog
   tor/branches/tor-0_1_2-patches/src/or/dirserv.c
   tor/branches/tor-0_1_2-patches/src/or/routerlist.c
Log:
 r12718 at catbus:  nickm | 2007-05-10 15:24:05 -0400
 Backport 10052+10053: avoid rare memory corruption on dirserver.



Property changes on: tor/branches/tor-0_1_2-patches
___________________________________________________________________
 svk:merge ticket from /tor/012 [r12718] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/branches/tor-0_1_2-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_2-patches/ChangeLog	2007-05-10 15:25:40 UTC (rev 10158)
+++ tor/branches/tor-0_1_2-patches/ChangeLog	2007-05-10 19:29:32 UTC (rev 10159)
@@ -5,7 +5,11 @@
       but leave it attached to the circuit, leading to unpredictable
       behavior. (Reported by seeess, fixes bug 425.)
 
+  o Major bugfixes:
+    - Fix a bug in dirserv_remove_invalid() that would cause authorities to
+      corrupt memory under some really unlikely scenarios.
 
+
 Changes in version 0.1.2.13 - 2007-04-24
   o Minor fixes:
     - Fix a memory leak when we ask for "all" networkstatuses and we

Modified: tor/branches/tor-0_1_2-patches/src/or/dirserv.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/dirserv.c	2007-05-10 15:25:40 UTC (rev 10158)
+++ tor/branches/tor-0_1_2-patches/src/or/dirserv.c	2007-05-10 19:29:32 UTC (rev 10159)
@@ -610,6 +610,7 @@
                ent->nickname, msg?msg:"");
       routerlist_remove(rl, ent, i--, 0);
       changed = 1;
+      continue;
     }
     if (bool_neq((r & FP_NAMED), ent->is_named)) {
       log_info(LD_DIRSERV,

Modified: tor/branches/tor-0_1_2-patches/src/or/routerlist.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-05-10 15:25:40 UTC (rev 10158)
+++ tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-05-10 19:29:32 UTC (rev 10159)
@@ -4482,7 +4482,7 @@
   digestmap_iter_t *iter;
   routerinfo_t *r2;
   signed_descriptor_t *sd2;
-  if (!routerlist)
+  if (!rl)
     return;
   SMARTLIST_FOREACH(rl->routers, routerinfo_t *, r,
   {



More information about the tor-commits mailing list