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.
This commit is contained in:
Nick Mathewson
2009-10-19 23:19:42 -04:00
parent f629687053
commit afc76a4e71
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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,