mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Merge branch 'bug32673_035'
This commit is contained in:
commit
af76b9dcc6
5
changes/bug32673
Normal file
5
changes/bug32673
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor bugfixes (TLS bug handling):
|
||||
- When encountering a bug in buf_read_freom_tls(), return a
|
||||
"MISC" error code rather than "WANTWRITE". This change might
|
||||
help avoid some CPU-wasting loops if the bug is ever triggered.
|
||||
Bug reported by opara. Fixes bug 32673; bugfix on 0.3.0.4-alpha.
|
@ -69,9 +69,9 @@ buf_read_from_tls(buf_t *buf, tor_tls_t *tls, size_t at_most)
|
||||
check_no_tls_errors();
|
||||
|
||||
IF_BUG_ONCE(buf->datalen >= INT_MAX)
|
||||
return -1;
|
||||
return TOR_TLS_ERROR_MISC;
|
||||
IF_BUG_ONCE(buf->datalen >= INT_MAX - at_most)
|
||||
return -1;
|
||||
return TOR_TLS_ERROR_MISC;
|
||||
|
||||
while (at_most > total_read) {
|
||||
size_t readlen = at_most - total_read;
|
||||
|
Loading…
Reference in New Issue
Block a user