diff options
author | teor <teor2345@gmail.com> | 2016-12-12 22:53:11 +1100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-01-30 08:37:23 -0500 |
commit | 584d723e04751330a677e7ce3673fc665713ea0a (patch) | |
tree | e3377a01baed473e81966bf923aa8098d036c45e /src/or/directory.c | |
parent | f009b13029b57f9c89077a041124066f6e9ba38c (diff) | |
download | tor-584d723e04751330a677e7ce3673fc665713ea0a.tar.gz tor-584d723e04751330a677e7ce3673fc665713ea0a.zip |
Restrict fuzzing to the directory headers
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 458116336b..012d440250 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -2895,9 +2895,9 @@ static const url_table_ent_t url_table[] = { * conn-\>outbuf. If the request is unrecognized, send a 404. * Return 0 if we handled this successfully, or -1 if we need to close * the connection. */ -STATIC int -directory_handle_command_get(dir_connection_t *conn, const char *headers, - const char *req_body, size_t req_body_len) +MOCK_IMPL(STATIC int, +directory_handle_command_get,(dir_connection_t *conn, const char *headers, + const char *req_body, size_t req_body_len)) { char *url, *url_mem, *header; time_t if_modified_since = 0; @@ -3705,9 +3705,9 @@ handle_post_hs_descriptor(const char *url, const char *body) * service descriptor. On finding one, process it and write a * response into conn-\>outbuf. If the request is unrecognized, send a * 400. Always return 0. */ -static int -directory_handle_command_post(dir_connection_t *conn, const char *headers, - const char *body, size_t body_len) +MOCK_IMPL(STATIC int, +directory_handle_command_post,(dir_connection_t *conn, const char *headers, + const char *body, size_t body_len)) { char *url = NULL; const or_options_t *options = get_options(); |