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

Re: [tor-bugs] #4889 [Tor Client]: Cleanup: use smartlist_add_asprintf() rather than tor_asprintf+smartlist_add()



#4889: Cleanup: use smartlist_add_asprintf() rather than
tor_asprintf+smartlist_add()
------------------------+---------------------------------------------------
 Reporter:  nickm       |          Owner:                    
     Type:  defect      |         Status:  needs_review      
 Priority:  normal      |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------
Changes (by nickm):

  * status:  new => needs_review


Comment:

 Renamed the function, and did a big pile of cleanups in branch "bug4889".

 It's a little long, but the changes are all local and straightforward.
 The biggest thing to watch out for would be some case where we did

 {{{
   len = very big thing
   x = tor_malloc(len);
   tor_snprintf(x,len,"foo%s%s...",...);
   append more stuff to x;
 }}}
 and I accidentally replaced it with
 {{{
   tor_asprintf(&x, "foo%s%s...",...);
   append morestuff to x;
 }}}

 But I think I avoided all those cases.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4889#comment:2>
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