diff --git a/changes/bug3615 b/changes/bug3615 new file mode 100644 index 0000000000..704b3faa31 --- /dev/null +++ b/changes/bug3615 @@ -0,0 +1,3 @@ + o Minor bugfixes: + - Fix a spurious warning when parsing SOCKS requests with + bufferevents enabled. Fixes bug 3615; bugfix on 0.2.3.2-alpha. diff --git a/src/or/buffers.c b/src/or/buffers.c index 256b507729..e2b0bd0e6f 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1581,12 +1581,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);