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

[or-cvs] r17253: {tor} Backport: Be even _more_ careful when signatures are bogus. (tor/branches/tor-0_2_0-patches/src/or)



Author: nickm
Date: 2008-11-11 12:14:26 -0500 (Tue, 11 Nov 2008)
New Revision: 17253

Modified:
   tor/branches/tor-0_2_0-patches/src/or/dirvote.c
Log:
Backport: Be even _more_ careful when signatures are bogus.

Modified: tor/branches/tor-0_2_0-patches/src/or/dirvote.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/or/dirvote.c	2008-11-11 17:14:12 UTC (rev 17252)
+++ tor/branches/tor-0_2_0-patches/src/or/dirvote.c	2008-11-11 17:14:26 UTC (rev 17253)
@@ -1877,7 +1877,12 @@
       networkstatus_get_detached_signatures(pending_consensus);
     const char *src;
     char *dst, *dst_end;
-    size_t new_consensus_len =
+    size_t new_consensus_len;
+    if (!new_detached) {
+      *msg_out = "No signatures to add";
+      goto err;
+    }
+    new_signatures_len =
       strlen(pending_consensus_body) + strlen(new_detached) + 1;
     pending_consensus_body = tor_realloc(pending_consensus_body,
                                          new_consensus_len);