diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-11-11 17:14:26 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-11-11 17:14:26 +0000 |
commit | 3882cef6437a8dda2b8cb1edb292cda03751439b (patch) | |
tree | ad6e8f90f8b3399f5abe1879bfdd9a7af86c4af7 | |
parent | a84e7e26dc9d5590d786864e30c38432bfe7ac5f (diff) | |
download | tor-3882cef6437a8dda2b8cb1edb292cda03751439b.tar.gz tor-3882cef6437a8dda2b8cb1edb292cda03751439b.zip |
Backport: Be even _more_ careful when signatures are bogus.
svn:r17253
-rw-r--r-- | src/or/dirvote.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 6fc234bd34..6706c8047b 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -1877,7 +1877,12 @@ dirvote_add_signatures_to_pending_consensus( 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); |