[tor-bugs] #14125 [Tor]: can't parse bandwidth file

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jan 7 11:18:28 UTC 2015


#14125: can't parse bandwidth file
--------------------+-------------------------------
 Reporter:  weasel  |          Owner:
     Type:  defect  |         Status:  new
 Priority:  normal  |      Milestone:
Component:  Tor     |        Version:  Tor: 0.2.5.10
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
--------------------+-------------------------------
 Hi,

 my authority is unable to correctly parse the bw file created by my
 bwauthority:

 {{{
 [warn] Incomplete line in bandwidth file:
 "node_id=$4BCE1492221439B9C836FF5129BB2B548DB0FEE6 bw=2760
 nick=0snowden4president measured_at=1418733785 updated_at=1418733785
 pid_error=-0.000288722464561 pid_error_sum=-0.000288722464561
 pid_bw=2764001 pid_delta=-0.0532977795585 circ_fail=0.333333333333"
 [warn] Incomplete line in bandwidth file: "\n"
 }}}

 Turns out that line is 256 chars long (including the \n).  The buffer in
 dirserv_read_measured_bandwidths() - dirserv.c:2263 - is slightly too
 short to hold that.

 Please consider using a longer char line[] there.

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


More information about the tor-bugs mailing list