[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #2045 [Tor Relay]: Make tor_check_port_forwarding handle incomplete lines
#2045: Make tor_check_port_forwarding handle incomplete lines
-----------------------+----------------------------------------------------
Reporter: sjmurdoch | Owner: sjmurdoch
Type: defect | Status: new
Priority: normal | Milestone:
Component: Tor Relay | Version:
Keywords: | Parent: #1775
-----------------------+----------------------------------------------------
The code for parsing the output of tor-fw-helper uses fgets() on a non-
blocking file descriptor to fetch each line of output. This appears to not
handle incomplete lines properly. Rather than buffering data until a
complete line is returned, fgets will return an incomplete line and set
errno to be EAGAIN. fgets() should be replaced with something which can
handle incomplete lines.
Issue was originally raised by nickm in bug #1903 and there is some
further discussion in that ticket.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2045>
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