aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-07-12 16:51:05 +0000
committerRoger Dingledine <arma@torproject.org>2004-07-12 16:51:05 +0000
commit379768290e1bff32bd696174b22ceaef397ab400 (patch)
tree62b79e3b83fc7d84c10667f2c0a60082b96af956 /src
parent3d63396d8d6f9ea61729863c7914cbdfcc8b88a4 (diff)
downloadtor-379768290e1bff32bd696174b22ceaef397ab400.tar
tor-379768290e1bff32bd696174b22ceaef397ab400.tar.gz
fix a bug related to reading usernames for socks4
this hasn't bitten us yet, but hey. svn:r2026
Diffstat (limited to 'src')
-rw-r--r--src/or/buffers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c
index 407b5f5a1..661b1e158 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -548,7 +548,8 @@ int fetch_from_buf_socks(buf_t *buf, socks_request_t *req) {
socks4_prot = socks4;
}
- next = memchr(buf->mem+SOCKS4_NETWORK_LEN, 0, buf->datalen);
+ next = memchr(buf->mem+SOCKS4_NETWORK_LEN, 0,
+ buf->datalen-SOCKS4_NETWORK_LEN);
if(!next) {
log_fn(LOG_DEBUG,"socks4: Username not here yet.");
return 0;