summaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-02-05 21:39:36 +0000
committerNick Mathewson <nickm@torproject.org>2008-02-05 21:39:36 +0000
commit83e740fa91c1b79341ff5d3a89d8ee2989b1f391 (patch)
treec2c2925f975650b31a33fbe86872e052c73c31d1 /src/or/dirvote.c
parente09c207c3c233f84bfb99492eb4163f4a5d0a71c (diff)
downloadtor-83e740fa91c1b79341ff5d3a89d8ee2989b1f391.tar.gz
tor-83e740fa91c1b79341ff5d3a89d8ee2989b1f391.zip
r17911@catbus: nickm | 2008-02-05 15:53:22 -0500
Fix a potential bug that would make authorities fail to vote under bizarre circumstances that probably never happened. svn:r13385
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r--src/or/dirvote.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index ec985b19cc..a9de115683 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -36,19 +36,15 @@ char *
format_networkstatus_vote(crypto_pk_env_t *private_signing_key,
networkstatus_t *v3_ns)
{
-/** Longest status flag name that we generate. */
-#define LONGEST_STATUS_FLAG_NAME_LEN 9
-/** Maximum number of status flags we'll apply to one router. */
-#define N_STATUS_FLAGS 10
/** Amount of space to allocate for each entry: r, s, and v lines. */
#define RS_ENTRY_LEN \
( /* first line */ \
MAX_NICKNAME_LEN+BASE64_DIGEST_LEN*2+ISO_TIME_LEN+INET_NTOA_BUF_LEN+ \
5*2 /* ports */ + 10 /* punctuation */ + \
/* second line */ \
- (LONGEST_STATUS_FLAG_NAME_LEN+1)*N_STATUS_FLAGS + 2 + \
- /* v line. XXXX020 not accurate! */ \
- 80 \
+ MAX_FLAG_LINE_LEN + \
+ /* v line. */ \
+ MAX_V_LINE_LEN \
)
size_t len;