[tor-bugs] #6853 [Tor Directory Authority]: Relay-flag voting code has undefined behaviour
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Mon Sep 17 14:27:18 UTC 2012
#6853: Relay-flag voting code has undefined behaviour
-------------------------------------+--------------------------------------
Reporter: rransom | Owner: rransom
Type: defect | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.4.x-final
Component: Tor Directory Authority | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------------------+--------------------------------------
Changes (by nickm):
* status: new => needs_review
Comment:
I did 1' : renamed flags to find every reference, then audited the code at
all those points, then changed the name of flags back. There were only a
small number of references in 3 files (one of which was test_dir.c), so it
was pretty easy.
It turns out the case above is the only problem I could find in the code
near these sites.
We should eventually do (2) or something like it.
I don't see any literal cases of (1<<31), though if somebody knows one,
I'd like to fix it. (I did a grep for "<<", then grepped all those for
"31".)
Please review branch "bug6853".
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6853#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list