aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-01-30 15:15:11 +0000
committerRoger Dingledine <arma@torproject.org>2004-01-30 15:15:11 +0000
commitb42b16357f4d7e0306bdc98804d08527134f7969 (patch)
treef0a73ffd04c8c10a0b6c31c2adeba7022d3e4d18 /src
parentc1cbb16e6f4739daf3da6558e7b7de533ff4d7fa (diff)
downloadtor-b42b16357f4d7e0306bdc98804d08527134f7969.tar
tor-b42b16357f4d7e0306bdc98804d08527134f7969.tar.gz
note an assert trigger, if you use an old broken netscape socks4
svn:r1022
Diffstat (limited to 'src')
-rw-r--r--src/or/buffers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c
index 9a759a7c2..0b5648130 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -532,6 +532,9 @@ int fetch_from_buf_socks(buf_t *buf, socks_request_t *req) {
}
log_fn(LOG_DEBUG,"Everything is here. Success.");
strcpy(req->address, socks4_prot == socks4 ? tmpbuf : startaddr);
+ /* XXX on very old netscapes (socks4) the next line triggers an
+ * assert, because next-buf->mem+1 is greater than buf->datalen.
+ */
buf_remove_from_front(buf, next-buf->mem+1); /* next points to the final \0 on inbuf */
return 1;