[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #7729 [Tor]: Reading pending TLS bytes can take us over at_most
#7729: Reading pending TLS bytes can take us over at_most
-----------------------+----------------------------------------------------
Reporter: nickm | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Tor: 0.2.4.x-final
Component: Tor | Version:
Keywords: tor-relay | Parent:
Points: | Actualpoints:
-----------------------+----------------------------------------------------
In connection_read_to_buf(), after we fetch pending TLS bytes, we re-set
'result' to be the total number of bytes actually read. But later we do:
{{{
if (more_to_read && result == at_most) {
slack_in_buf = buf_slack(conn->inbuf);
at_most = more_to_read;
goto again;
}
}}}
That's not good; 'result' can also be >= at_most, which might also mean
that we should try reading more, maybe.
Reported pseudonymously; the reporter attached this patch. Possibly
backportable to 0.2.3.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7729>
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