[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[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: |
-----------------+----------------------------------------------------------
The helper functions get_uint{16,32,64}() and set_uint{16,32,64}() should
be used instead of "*(uint16_t*)(cp)" etc. to avoid unaligned address
access problems with specific OSes.
There are many cases in the source tree that this doesn't happen.
For example, in the cell_unpack() function we have:
{{{
dest->command = *(uint8_t*)(src+2);
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1943>
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
- Follow-Ups:
- Re: [tor-bugs] #1943 [Tor Relay]: Helper functions {get, set}_uint{16, 32, 64}() are not used
- From: Tor Bug Tracker & Wiki
- Re: [tor-bugs] #1943 [Tor Relay]: Helper functions {get, set}_uint{16, 32, 64}() are not used
- From: Tor Bug Tracker & Wiki
- Re: [tor-bugs] #1943 [Tor Relay]: Helper functions {get, set}_uint{16, 32, 64}() are not used
- From: Tor Bug Tracker & Wiki
- Re: [tor-bugs] #1943 [Tor Relay]: Helper functions {get, set}_uint{16, 32, 64}() are not used
- From: Tor Bug Tracker & Wiki
- Re: [tor-bugs] #1943 [Tor Relay]: Helper functions {get, set}_uint{16, 32, 64}() are not used
- From: Tor Bug Tracker & Wiki
- Re: [tor-bugs] #1943 [Tor Relay]: Helper functions {get, set}_uint{16, 32, 64}() are not used
- From: Tor Bug Tracker & Wiki