[tor-bugs] #20717 [Core Tor/Tor]: Hashing api should return negative values for errors

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Nov 24 17:33:02 UTC 2016


#20717: Hashing api should return negative values for errors
--------------------------+------------------------------------
 Reporter:  chelseakomlo  |          Owner:
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: 0.3.0.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:  029-backport  |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------

Comment (by chelseakomlo):

 I have a patch for this here:
 `git at github.com:chelseakomlo/tor_patches.git`, branch
 `20717_hashing_api_bug`

 My concern about this fix is that there are no tests to validate this
 behavior. I wasn't sure how to write test cases that would either 1) force
 the error case to happen, or 2) mock the hashing functions that are
 wrapped.

 Any suggestions would be great- if you want to go ahead and merge this
 code, that is fine too, we can think about longer-term options to make
 sure we don't see these kinds of bugs in the future.

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


More information about the tor-bugs mailing list