From d33880d0df90801e117585f21eeec4f6d314e8a3 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 2 Dec 2008 19:16:11 +0000 Subject: [PATCH] Backport: Apply rovv's patch for bug 864: avoid null error on detached signature handling failure. svn:r17447 --- ChangeLog | 7 +++++++ src/or/dirvote.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5709e27879..4c11206664 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,13 @@ Changes in version 0.2.0.33 - 200?-??-?? 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. Changes in version 0.2.0.32 - 2008-11-20 diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 1cf980c619..b522cd19e6 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -1909,13 +1909,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)