Reject votes (not consensuses) with >64 known-flags
commitc8b98ba41ce37662cf14fdb3c6a74ae83b8b0bf8
authorNick Mathewson <nickm@torproject.org>
Thu, 13 Sep 2012 15:45:05 +0000 (13 11:45 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 13 Sep 2012 15:45:05 +0000 (13 11:45 -0400)
tree31a16ace0d585fb8491e4d3edf9be00f8a578ef0
parent582f2187a769ea723f6bf13bc91f7a4b3c861408
Reject votes (not consensuses) with >64 known-flags

Our flag voting code needs to handle unrecognized flags, so it stores
them in a 64-bit bitfield.  But we never actually checked for too many
flags, so we were potentially doing stuff like U64_LITERAL(1)<<flagnum
with flagnum >= 64.  That's undefined behavior.

Fix for bug 6833; bugfix on 0.2.0.1-alpha.
changes/bug6833 [new file with mode: 0644]
src/or/or.h
src/or/routerparse.c