[tor-bugs] #6877 [Core Tor/Tor]: Finally replace all char[] buffers with uint8_t[] buffers

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat May 27 11:11:45 UTC 2017


#6877: Finally replace all char[] buffers with uint8_t[] buffers
-------------------------------------------------+-------------------------
 Reporter:  nickm                                |          Owner:
     Type:  defect                               |         Status:  new
 Priority:  High                                 |      Milestone:  Tor:
                                                 |  unspecified
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-client tor-relay refactoring     |  Actual Points:
  technical-debt lots-of-work                    |
Parent ID:                                       |         Points:  10
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by cypherpunks):

 Replying to [comment:25 catalyst]:
 > A comment on stackoverflow reminds me that uint8_t could be char on a
 platform where char is unsigned.  It would still be a character type in
 that case and would therefore still have the privileged aliasing
 properties.  (The test in #22410 would need to additionally check for the
 possibility that uint8_t is char on platforms where char is unsigned, if
 such platforms existed.)
 Checking how C implementations implement certain data types is the wrong
 approach. The only thing you can depend on is how the C standard defines
 it. All else is implementation-defined and doomed to fail if the code
 depends on it.

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


More information about the tor-bugs mailing list