summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-11-12 21:59:27 +0000
committerRoger Dingledine <arma@torproject.org>2004-11-12 21:59:27 +0000
commit5864f4ac0117142ed9ae7dc6e2c41e5d65e59bf2 (patch)
tree28c7eeb77a5a167a533ea87aa37d2e2e3fff3019
parenta3788d5c9d634792a7f95ea090ee0a3c1475b292 (diff)
downloadtor-5864f4ac0117142ed9ae7dc6e2c41e5d65e59bf2.tar.gz
tor-5864f4ac0117142ed9ae7dc6e2c41e5d65e59bf2.zip
fix a seg fault when fetching rendezvous descs
svn:r2825
-rw-r--r--src/or/directory.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index e0291047ac..e763af1d05 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -314,8 +314,8 @@ directory_initiate_command(const char *address, uint32_t addr,
}
}
-/** Queue an appropriate HTTP command on conn-\>outbuf. The other args as in
- * directory_initiate_command.
+/** Queue an appropriate HTTP command on conn-\>outbuf. The other args
+ * are as in directory_initiate_command.
*/
static void
directory_send_command(connection_t *conn, const char *platform,
@@ -371,7 +371,7 @@ directory_send_command(connection_t *conn, const char *platform,
tor_assert(!payload);
/* this must be true or we wouldn't be doing the lookup */
- tor_assert(strlen(payload) <= REND_SERVICE_ID_LEN);
+ tor_assert(strlen(resource) <= REND_SERVICE_ID_LEN);
/* This breaks the function abstraction. */
strlcpy(conn->rend_query, resource, sizeof(conn->rend_query));
@@ -391,7 +391,7 @@ directory_send_command(connection_t *conn, const char *platform,
httpcommand,
proxystring,
url,
- (unsigned long)payload_len,
+ payload ? (unsigned long)payload_len : 0,
hoststring);
connection_write_to_buf(tmp, strlen(tmp), conn);