Avoid overflow on wrapping a TLS read.

svn:r4125
This commit is contained in:
Nick Mathewson 2005-04-26 21:20:22 +00:00
parent e6794e5808
commit ecc76d8245

View File

@ -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