[tor-bugs] #8308 [Tor]: Use smartlist-of-strings rather than preallocated-charbuf for more directory stuff

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Mar 18 19:01:01 UTC 2013


#8308: Use smartlist-of-strings rather than preallocated-charbuf for more
directory stuff
--------------------------------+-------------------------------------------
 Reporter:  nickm               |          Owner:                    
     Type:  defect              |         Status:  needs_review      
 Priority:  normal              |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor                 |        Version:                    
 Keywords:  tor-auth tor-relay  |         Parent:                    
   Points:                      |   Actualpoints:                    
--------------------------------+-------------------------------------------
Changes (by nickm):

  * status:  needs_revision => needs_review


Comment:

 Replying to [comment:2 asn]:
 > Hm, `less_charbuf` changes dangerous parts of the code. More review
 should be needed. Good thing is that the code looks much much cleaner now.

 > do you want the NUL in all cases, or do you want:
 > {{{
 > crypto_digest_smartlist(digest, digest_len, chunks, NULL, digest_alg);
 > }}}
 > instead? (I'm not sure myself)

 The NUL isn't included; "" just semeed a cleaner way to specify "append no
 bytes."

 >
 > * In some cases where the old code would error out, we now continue. Is
 this intended? Examples:

 I think that in all the cases I did this, it's right to do so; if one
 element of a vote or a v2 routerstatus is unformattable, there's no reason
 to give up IMO.

 Fixed the docdoc and the comment.

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


More information about the tor-bugs mailing list