summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-10-19 23:19:42 -0400
committerNick Mathewson <nickm@torproject.org>2009-10-19 23:19:42 -0400
commitafc76a4e714a192e76281793f39c412c87964e46 (patch)
treeaca0d0ad0aca768f9fe2ce5426662dc81d933813 /src/or
parentf6296870535ef3a37bbf5b5b92b393f9c6b7c0a2 (diff)
downloadtor-afc76a4e714a192e76281793f39c412c87964e46.tar.gz
tor-afc76a4e714a192e76281793f39c412c87964e46.zip
Fix two bugs found by Coverity scan.
One was a simple buffer overrun; the other was a high-speed pointer collision. Both were introduced by my microdescs branch.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/dirvote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index ca81b2be9d..5ce3fd2ca7 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -2794,7 +2794,7 @@ ssize_t
dirvote_format_microdesc_vote_line(char *out, size_t out_len,
const microdesc_t *md)
{
- char d64[BASE64_DIGEST256_LEN];
+ char d64[BASE64_DIGEST256_LEN+1];
if (!microdesc_consensus_methods) {
microdesc_consensus_methods =
make_consensus_method_list(MIN_METHOD_FOR_MICRODESC,