[tor-bugs] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon May 16 07:28:09 UTC 2016


#16943: Implement prop250 (Random Number Generation During Tor Voting)
---------------------------------------+-----------------------------------
 Reporter:  asn                        |          Owner:  dgoulet
     Type:  enhancement                |         Status:  needs_revision
 Priority:  High                       |      Milestone:  Tor:
Component:  Core Tor/Tor               |  0.2.9.x-final
 Severity:  Normal                     |        Version:
 Keywords:  tor-hs, TorCoreTeam201605  |     Resolution:
Parent ID:  #8244                      |  Actual Points:
 Reviewer:  nickm                      |         Points:  large
                                       |        Sponsor:  SponsorR-must
---------------------------------------+-----------------------------------

Comment (by teor):

 Let's call the bug above T6.

 T7: In `sr_parse_srv()` you parse a string as a long between 0 and
 INT32_MAX, then cast and assign it to an int. It's good you limit the
 value to INT32_MAX rather than INT_MAX, which varies by architecture. Can
 you also use an int32_t for `num_reveals` and `sr_srv_t.num_reveals` to
 make this limit clearer?
 {{{
 int num_reveals, ok, ret;
 sr_srv_t *srv = NULL;
 ...
 num_reveals = (int)tor_parse_long(smartlist_get(args, 0),
                                10, 0, INT32_MAX, &ok, NULL);
 ...
 srv->num_reveals = num_reveals;
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16943#comment:62>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list