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

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



#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs