1 /* Copyright (c) 2016-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
6 #define BUFFERS_PRIVATE
7 #include "core/or/or.h"
9 #include "lib/buf/buffers.h"
10 #include "lib/err/backtrace.h"
11 #include "lib/log/log.h"
12 #include "core/proto/proto_socks.h"
13 #include "feature/client/addressmap.h"
15 #include "test/fuzz/fuzzing.h"
27 addressmap_free_all();
32 fuzz_main(const uint8_t *stdin_buf
, size_t data_size
)
34 buf_t
*buffer
= buf_new_with_data((char*)stdin_buf
, data_size
);
36 tor_assert(data_size
==0);
40 socks_request_t
*request
= socks_request_new();
42 int r
= fetch_from_buf_socks(buffer
, request
, 0, 0);
43 log_info(LD_GENERAL
, "Socks request status: %d", r
);
47 socks_request_free(request
);