[or-cvs] r17446: {tor} Apply rovv's patch for bug 864: avoid null error on detached (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Tue Dec 2 19:13:24 UTC 2008


Author: nickm
Date: 2008-12-02 14:13:23 -0500 (Tue, 02 Dec 2008)
New Revision: 17446

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/dirvote.c
Log:
Apply rovv's patch for bug 864: avoid null error on detached signature handling failure.

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-12-02 18:56:15 UTC (rev 17445)
+++ tor/trunk/ChangeLog	2008-12-02 19:13:23 UTC (rev 17446)
@@ -24,7 +24,14 @@
       could make gcc generate non-functional binary search code. Bugfix
       on 0.2.0.10-alpha.
     - Build correctly on platforms without socklen_t.
+    - Avoid potential crash on internal error during signature collection.
+      Fixes bug 864.  Patch from rovv.
 
+  o Minor features:
+    - Report the case where all signatures in a detached set are rejected
+      differently than the case where there is an error handling the detached
+      set.
+
   o Minor features (controller):
     - Return circuit purposes in response to GETINFO circuit-status.  Fixes
       bug 858.

Modified: tor/trunk/src/or/dirvote.c
===================================================================
--- tor/trunk/src/or/dirvote.c	2008-12-02 18:56:15 UTC (rev 17445)
+++ tor/trunk/src/or/dirvote.c	2008-12-02 19:13:23 UTC (rev 17446)
@@ -2082,13 +2082,15 @@
     tor_free(pending_consensus_signatures);
     pending_consensus_signatures = new_detached;
     *msg_out = "Signatures added";
+  } else if (r == 0) {
+    *msg_out = "Signatures ignored";
   } else {
     goto err;
   }
 
   goto done;
  err:
-  if (!msg_out)
+  if (!*msg_out)
     *msg_out = "Unrecognized error while adding detached signatures.";
  done:
   if (sigs)



More information about the tor-commits mailing list