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

Re: [tor-bugs] #18263 [Tor]: GETCONF provides incorrect value when undefined



#18263: GETCONF provides incorrect value when undefined
--------------------+------------------------------------
 Reporter:  atagar  |          Owner:
     Type:  defect  |         Status:  new
 Priority:  Medium  |      Milestone:  Tor: 0.2.8.x-final
Component:  Tor     |        Version:
 Severity:  Minor   |     Resolution:
 Keywords:  easy    |  Actual Points:
Parent ID:          |         Points:
  Sponsor:          |
--------------------+------------------------------------

Comment (by icanhasaccount):

 It looks like the empty values are created in confparse.c:

     case CONFIG_TYPE_CSV:
       if (*(smartlist_t**)value)
         result->value =
           smartlist_join_strings(*(smartlist_t**)value, ",", 0, NULL);
       else
         result->value = tor_strdup("");
       break;
 ...
     case CONFIG_TYPE_ROUTERSET:
       result->value = routerset_to_string(*(routerset_t**)value);
       break;
 ...

 The attached patch attempts to fix the output in handle_control_getconf -
 but I'm not sure its the best approach?

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