[or-cvs] and forward port the cleanup
Roger Dingledine
arma at seul.org
Wed Dec 22 10:04:55 UTC 2004
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or
Modified Files:
buffers.c
Log Message:
and forward port the cleanup
Index: buffers.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/buffers.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- buffers.c 22 Dec 2004 09:52:29 -0000 1.123
+++ buffers.c 22 Dec 2004 10:04:50 -0000 1.124
@@ -584,19 +584,19 @@
tor_assert(next < buf->mem+buf->datalen);
startaddr = NULL;
- if (socks4_prot == socks4a && next+1 == buf->mem+buf->datalen) {
- log_fn(LOG_DEBUG,"socks4: No part of destaddr here yet.");
- return 0;
- }
if (socks4_prot != socks4a && !have_warned_about_unsafe_socks) {
log_fn(LOG_WARN,"Your application (using socks4 on port %d) is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead.", req->port);
// have_warned_about_unsafe_socks = 1; // (for now, warn every time)
}
- if (socks4_prot == socks4a && next+1 < buf->mem+buf->datalen) {
+ if (socks4_prot == socks4a) {
+ if (next+1 == buf->mem+buf->datalen) {
+ log_fn(LOG_DEBUG,"socks4: No part of destaddr here yet.");
+ return 0;
+ }
startaddr = next+1;
next = memchr(startaddr, 0, buf->mem+buf->datalen-startaddr);
if (!next) {
- log_fn(LOG_DEBUG,"socks4: Destaddr not here yet.");
+ log_fn(LOG_DEBUG,"socks4: Destaddr not all here yet.");
return 0;
}
if (MAX_SOCKS_ADDR_LEN <= next-startaddr) {
More information about the tor-commits
mailing list