[tor-bugs] #28077 [Core Tor/Tor]: remove unsafe block from cstr! macro

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Oct 17 00:29:38 UTC 2018


#28077: remove unsafe block from cstr! macro
--------------------------+------------------------------------
 Reporter:  cyberpunks    |          Owner:  (none)
     Type:  defect        |         Status:  needs_revision
 Priority:  Medium        |      Milestone:
Component:  Core Tor/Tor  |        Version:  Tor: 0.3.4.1-alpha
 Severity:  Normal        |     Resolution:
 Keywords:  rust          |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------
Changes (by teor):

 * status:  new => needs_revision


Comment:

 from_bytes_with_nul returns an error if there is more than one nul byte in
 the string.

 In this case, I think we either want to keep the interior nul byte (like
 the original code) or fail.
 Returning an empty string could be a source of subtle bugs.

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


More information about the tor-bugs mailing list