diff options
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 63132db204..5b9e55ebd5 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1614,12 +1614,12 @@ fetch_from_evbuffer_socks(struct evbuffer *buf, socks_request_t *req, */ struct evbuffer_iovec v; int i; - want_length = evbuffer_get_contiguous_space(buf); n_drain = 0; - i = evbuffer_peek(buf, want_length, NULL, &v, 1); + i = evbuffer_peek(buf, -1, NULL, &v, 1); tor_assert(i == 1); data = v.iov_base; datalen = v.iov_len; + want_length = 0; res = parse_socks(data, datalen, req, log_sockstype, safe_socks, &n_drain, &want_length); |