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

Re: [tor-bugs] #3523 [Tor]: Allow controllers to post HS descriptors to the HSDir system



#3523: Allow controllers to post HS descriptors to the HSDir system
-----------------------------+-----------------------------------
     Reporter:  rransom      |      Owner:
         Type:  enhancement  |     Status:  needs_revision
     Priority:  minor        |  Milestone:  Tor: 0.2.7.x-final
    Component:  Tor          |    Version:
   Resolution:               |   Keywords:  maybe-proposal tor-hs
Actual Points:               |  Parent ID:  #8993
       Points:               |
-----------------------------+-----------------------------------

Comment (by yawning):

 Replying to [comment:17 dgoulet]:
 > I was reviewing but then you fixed the patch with the above so my review
 is a bit useless now ;). As for the `memchr() and *cp++ = '\n'` thingy,
 that's just plain bad. Assigning something to an originally const char
 pointer is not advise. Actually, if that memory was not in a writable
 section, you hit a big segfault. POSTDESCRIPTOR code should be fixed
 because this is very very bad practice.

 Yeah probably.  Just `tor_strdup()` body or something, and make sure to
 free the copy on exit.

 > The rest of the patch is fine. I'll have another look at the next
 revision :).

 Actually I screwed up.

 The line that reads `tor_free(desc);` should be
 `rend_encoded_v2_service_descriptor_free(desc);`, since `desc->desc_str`
 needs to be cleaned up.  The routine does the right thing on `NULL`, so a
 straight forward replacement is fine.  A dumb mistake that I shouldn't
 make. :(

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