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

[or-cvs] Fix bug found by "ca": looking up a non-existent stream for...



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv1240/src/or

Modified Files:
	control.c 
Log Message:
Fix bug found by "ca": looking up a non-existent stream for a v1 control connection would cause a segfault. (No backport needed since 0.1.0 had only v0 connections.)

Index: control.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/control.c,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- control.c	8 Sep 2005 06:37:50 -0000	1.127
+++ control.c	12 Sep 2005 03:32:30 -0000	1.128
@@ -599,7 +599,7 @@
   if (!ok)
     return NULL;
   conn = connection_get_by_global_id(n_id);
-  if (conn->type != CONN_TYPE_AP)
+  if (!conn || conn->type != CONN_TYPE_AP)
     return NULL;
   return conn;
 }