[or-cvs] no need to trigger an assert if socks handshake is malformed

Roger Dingledine arma at seul.org
Mon Oct 6 21:22:15 UTC 2003


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

Modified Files:
	connection_edge.c 
Log Message:
no need to trigger an assert if socks handshake is malformed


Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- connection_edge.c	4 Oct 2003 08:19:21 -0000	1.33
+++ connection_edge.c	6 Oct 2003 21:22:12 -0000	1.34
@@ -524,7 +524,7 @@
     connection_write_to_buf(buf,10,conn);
     return connection_flush_buf(conn); /* try to flush it */
   }
-  assert(0);
+  return 0; /* if socks_version isn't 4 or 5, don't send anything */
 }
 
 /*ENDCLOSE*/ static int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) {



More information about the tor-commits mailing list