[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #1943 [Tor Relay]: Helper functions {get, set}_uint{16, 32, 64}() are not used



#1943: Helper functions {get,set}_uint{16,32,64}() are not used
-----------------+----------------------------------------------------------
 Reporter:  asn  |        Type:  defect   
   Status:  new  |    Priority:  normal   
Milestone:       |   Component:  Tor Relay
  Version:       |    Keywords:           
   Parent:       |  
-----------------+----------------------------------------------------------

Comment(by nickm):

 well, *(uint8_t*)(ptr) is safe: a one-byte read or write is always
 aligned.

 grep '*(uint[136]' src/*/*.c is a good way to look for cases, though not
 all are problematic.  All the ones that touch character buffers should get
 fixed, even if they wind up being aligned-by-accident.  The ones where the
 memory is aligned-on-purpose but cast to void* so we can pass it to a
 generic function don't need fixing.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1943#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs