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

[or-cvs] r17275: {tor} Fix a possible segfault when establishing an exit connection (in tor/trunk: . src/or)



Author: kloesing
Date: 2008-11-15 20:52:44 -0500 (Sat, 15 Nov 2008)
New Revision: 17275

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/connection_edge.c
Log:
Fix a possible segfault when establishing an exit connection. Bugfix on 0.2.1.5-alpha.

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-11-15 19:28:45 UTC (rev 17274)
+++ tor/trunk/ChangeLog	2008-11-16 01:52:44 UTC (rev 17275)
@@ -2,6 +2,8 @@
   o Major bugfixes:
     - Fix a DOS opportunity during the voting signature collection process
       at directory authorities. Spotted by rovv. Bugfix on 0.2.0.x.
+    - Fix a possible segfault when establishing an exit connection. Bugfix
+      on 0.2.1.5-alpha.
 
   o Minor bugfixes:
     - Get file locking working on win32.  Bugfix on 0.2.1.6-alpha.  Fixes

Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c	2008-11-15 19:28:45 UTC (rev 17274)
+++ tor/trunk/src/or/connection_edge.c	2008-11-16 01:52:44 UTC (rev 17275)
@@ -296,7 +296,6 @@
 int
 connection_edge_finished_connecting(edge_connection_t *edge_conn)
 {
-  char valbuf[INET_NTOA_BUF_LEN];
   connection_t *conn;
 
   tor_assert(edge_conn);
@@ -305,7 +304,8 @@
   tor_assert(conn->state == EXIT_CONN_STATE_CONNECTING);
 
   log_info(LD_EXIT,"Exit connection to %s:%u (%s) established.",
-           escaped_safe_str(conn->address),conn->port,safe_str(valbuf));
+           escaped_safe_str(conn->address),conn->port,
+           fmt_addr(&conn->addr));
 
   conn->state = EXIT_CONN_STATE_OPEN;
   connection_watch_events(conn, EV_READ); /* stop writing, continue reading */