From: Nick Mathewson Date: Fri, 14 Sep 2012 14:10:16 +0000 (-0400) Subject: document why we only allow 64 flags in votes X-Git-Tag: tor-0.2.4.3-alpha~31^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68caa834f4ed9cae16a551c9fc63ea982c9f1904;p=thirdparty%2Ftor.git document why we only allow 64 flags in votes --- diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 496b90d4ad..43a95e88c1 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -3006,6 +3006,11 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out, } if (ns->type != NS_TYPE_CONSENSUS && smartlist_len(ns->known_flags) > MAX_KNOWN_FLAGS_IN_VOTE) { + /* If we allowed more than 64 flags in votes, then parsing them would make + * us invoke undefined behavior whenever we used 1<