[tor-bugs] #2320 [Tor Client]: var_cell_t with payload_len 0 risky

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Thu Jan 6 09:07:34 UTC 2011


#2320: var_cell_t with payload_len 0 risky
------------------------+---------------------------------------------------
 Reporter:  arma        |       Owner:                    
     Type:  defect      |      Status:  new               
 Priority:  normal      |   Milestone:  Tor: 0.2.2.x-final
Component:  Tor Client  |     Version:                    
 Keywords:              |      Parent:                    
------------------------+---------------------------------------------------

Comment(by cypherpunks):

 typedef struct emptycell_t {
   uint8_t payload[1];
 } empty_cell_t;

 empty_cell_t *cell=tor_malloc(0); /* just because we know for sure it's
 zero length. */

 Any sense for cell->payload?
 It's not the same as
 char *end=&cell+0; /*zero length */

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


More information about the tor-bugs mailing list