From 339f09405608ac5277fc0f43f459352967e7803d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 5 Sep 2008 21:19:53 +0000 Subject: Refactor some code and add some asserts based on scanner results. svn:r16783 --- src/or/control.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/or/control.c') 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 : "", -- cgit v1.2.3-54-g00ecf