[or-cvs] fix a seg fault with autodetecting which controller version...
arma at seul.org
arma at seul.org
Tue Jul 12 05:48:18 UTC 2005
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
buffers.c control.c
Log Message:
fix a seg fault with autodetecting which controller version is being used
Index: buffers.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/buffers.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- buffers.c 20 Jun 2005 23:04:13 -0000 1.165
+++ buffers.c 12 Jul 2005 05:48:15 -0000 1.166
@@ -1082,7 +1082,7 @@
#define CONTROL_CMD_FRAGMENTHEADER 0x0010
#define CONTROL_CMD_FRAGMENT 0x0011
-/** If there is a complete version 0control message waiting on buf, then store
+/** If there is a complete version 0 control message waiting on buf, then store
* its contents into *<b>type_out</b>, store its body's length into
* *<b>len_out</b>, allocate and store a string for its body into
* *<b>body_out</b>, and return 1. (body_out will always be NUL-terminated,
Index: control.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/control.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- control.c 11 Jul 2005 18:11:54 -0000 1.99
+++ control.c 12 Jul 2005 05:48:15 -0000 1.100
@@ -1948,7 +1948,7 @@
{
uint32_t body_len;
uint16_t command_type;
- char *body;
+ char *body=NULL;
again:
/* Try to suck a control message from the buffer. */
@@ -1957,7 +1957,7 @@
{
case -2:
tor_free(body);
- log_fn(LOG_INFO, "Detected v1 contol protocol on connection (fd %d)",
+ log_fn(LOG_INFO, "Detected v1 control protocol on connection (fd %d)",
conn->s);
conn->state = CONTROL_CONN_STATE_NEEDAUTH_V1;
return connection_control_process_inbuf_v1(conn);
More information about the tor-commits
mailing list