[tor-bugs] #2332 [Tor Relay]: dnsserv_resolved is icky

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Dec 29 19:26:50 UTC 2010


#2332: dnsserv_resolved is icky
-----------------------+----------------------------------------------------
 Reporter:  rransom    |       Owner:     
     Type:  defect     |      Status:  new
 Priority:  minor      |   Milestone:     
Component:  Tor Relay  |     Version:     
 Keywords:  easy       |      Parent:     
-----------------------+----------------------------------------------------
 doors found some more buried treasure:

 `dnsserv_resolved` casts its argument `const char *answer` to `char *`
 before passing it to `evdns_server_request_add_a_reply` or
 `evdns_server_request_add_ptr_reply`.  In both cases, it is then passed as
 a `const char *` argument to `evdns_server_request_add_reply`, so the
 casts probably aren't dangerous, but they're ugly and should be removed.

 `dnsserv_resolved` also allocates a copy `ans` of `answer` before the call
 to `evdns_server_request_add_ptr_reply`, and frees it immediately
 afterward without using it.  This clearly needs to be removed too.

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


More information about the tor-bugs mailing list