mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
fix a seg fault when fetching rendezvous descs
svn:r2825
This commit is contained in:
parent
a3788d5c9d
commit
5864f4ac01
@ -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
|
/** Queue an appropriate HTTP command on conn-\>outbuf. The other args
|
||||||
* directory_initiate_command.
|
* are as in directory_initiate_command.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
directory_send_command(connection_t *conn, const char *platform,
|
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);
|
tor_assert(!payload);
|
||||||
|
|
||||||
/* this must be true or we wouldn't be doing the lookup */
|
/* 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. */
|
/* This breaks the function abstraction. */
|
||||||
strlcpy(conn->rend_query, resource, sizeof(conn->rend_query));
|
strlcpy(conn->rend_query, resource, sizeof(conn->rend_query));
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ directory_send_command(connection_t *conn, const char *platform,
|
|||||||
httpcommand,
|
httpcommand,
|
||||||
proxystring,
|
proxystring,
|
||||||
url,
|
url,
|
||||||
(unsigned long)payload_len,
|
payload ? (unsigned long)payload_len : 0,
|
||||||
hoststring);
|
hoststring);
|
||||||
connection_write_to_buf(tmp, strlen(tmp), conn);
|
connection_write_to_buf(tmp, strlen(tmp), conn);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user