mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Avoid overflow on wrapping a TLS read.
svn:r4125
This commit is contained in:
parent
e6794e5808
commit
ecc76d8245
@ -417,7 +417,7 @@ int read_to_buf_tls(tor_tls *tls, size_t at_most, buf_t *buf) {
|
||||
if (at_start) {
|
||||
int r2;
|
||||
tor_assert(_buf_end(buf) == buf->mem);
|
||||
r2 = read_to_buf_tls_impl(tls, at_most, buf, buf->mem);
|
||||
r2 = read_to_buf_tls_impl(tls, at_start, buf, buf->mem);
|
||||
if (r2 < 0)
|
||||
return r2;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user