Commit 8f9790a0 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

fix a seg fault with autodetecting which controller version is being used


svn:r4531
parent 63f9a8ba
Loading
Loading
Loading
Loading
+2 −2
Changes for src/or/control.c: 2 added lines, 2 removed lines.
Original line number Original line Diff line number Diff line
@@ -1948,7 +1948,7 @@ connection_control_process_inbuf_v0(connection_t *conn)
{
{
  uint32_t body_len;
  uint32_t body_len;
  uint16_t command_type;
  uint16_t command_type;
  char *body;
  char *body=NULL;


 again:
 again:
  /* Try to suck a control message from the buffer. */
  /* Try to suck a control message from the buffer. */
@@ -1957,7 +1957,7 @@ connection_control_process_inbuf_v0(connection_t *conn)
    {
    {
    case -2:
    case -2:
      tor_free(body);
      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->s);
      conn->state = CONTROL_CONN_STATE_NEEDAUTH_V1;
      conn->state = CONTROL_CONN_STATE_NEEDAUTH_V1;
      return connection_control_process_inbuf_v1(conn);
      return connection_control_process_inbuf_v1(conn);
+1 −1

File changed.

Contains only whitespace changes.