From: Nick Mathewson Date: Tue, 2 Dec 2008 19:13:23 +0000 (+0000) Subject: Apply rovv's patch for bug 864: avoid null error on detached signature handling failure. X-Git-Tag: tor-0.2.1.8-alpha~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c65195449c659a4dc940ae377c6728919dddef4;p=thirdparty%2Ftor.git Apply rovv's patch for bug 864: avoid null error on detached signature handling failure. svn:r17446 --- diff --git a/ChangeLog b/ChangeLog index 8e2eb83925..47e7e76168 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,13 @@ Changes in version 0.2.1.8-alpha - 2008-??-?? 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 diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 69c5e09a1c..8fe53c7953 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -2082,13 +2082,15 @@ dirvote_add_signatures_to_pending_consensus( 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)