summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-09-05 21:19:53 +0000
committerNick Mathewson <nickm@torproject.org>2008-09-05 21:19:53 +0000
commit339f09405608ac5277fc0f43f459352967e7803d (patch)
treecc5d0348b4046acd4b81ef3cf5a881663da1b80b /src/or/control.c
parenta34550667298dcff6cbd7333288d71808b800b33 (diff)
downloadtor-339f09405608ac5277fc0f43f459352967e7803d.tar.gz
tor-339f09405608ac5277fc0f43f459352967e7803d.zip
Refactor some code and add some asserts based on scanner results.
svn:r16783
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 9c3f749d6f..ac31f5d940 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -3021,6 +3021,8 @@ write_stream_target_to_buf(edge_connection_t *conn, char *buf, size_t len)
if (conn->chosen_exit_name)
if (tor_snprintf(buf2, sizeof(buf2), ".%s.exit", conn->chosen_exit_name)<0)
return -1;
+ if (!conn->socks_request)
+ return -1;
if (tor_snprintf(buf, len, "%s%s%s:%d",
conn->socks_request->address,
conn->chosen_exit_name ? buf2 : "",