diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-09-17 10:24:52 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-09-17 10:24:52 -0400 |
commit | 414adb237bc51e0e1b7321364dd73d9b3e635733 (patch) | |
tree | 1e56a0d38253990434a94719687d121641090060 /src/or/routerparse.c | |
parent | b1447a4312c47f13bf8ddddab09f19ee73640a3e (diff) | |
download | tor-414adb237bc51e0e1b7321364dd73d9b3e635733.tar.gz tor-414adb237bc51e0e1b7321364dd73d9b3e635733.zip |
Parse votes with >31 flags correctly
We were doing (1<<p) to generate a flag at position p, but we should
have been doing (U64_LITERAL(1)<<p).
Fixes bug 6861; bugfix on 0.2.0.3-alpha; reported pseudonymously.
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 2bf072b3cf..022add393f 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -2067,7 +2067,7 @@ routerstatus_parse_entry_from_string(memarea_t *area, for (i=0; i < tok->n_args; ++i) { int p = smartlist_string_pos(vote->known_flags, tok->args[i]); if (p >= 0) { - vote_rs->flags |= (1<<p); + vote_rs->flags |= (U64_LITERAL(1)<<p); } else { log_warn(LD_DIR, "Flags line had a flag %s not listed in known_flags.", escaped(tok->args[i])); |