[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] fix a bug related to reading usernames for socks4



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	buffers.c 
Log Message:
fix a bug related to reading usernames for socks4
this hasn't bitten us yet, but hey.


Index: buffers.c
===================================================================
RCS file: /home/or/cvsroot/src/or/buffers.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -r1.97 -r1.98
--- buffers.c	17 Jun 2004 21:11:09 -0000	1.97
+++ buffers.c	12 Jul 2004 16:51:05 -0000	1.98
@@ -548,7 +548,8 @@
         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;