diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-12-14 17:11:26 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-01-30 08:37:24 -0500 |
commit | 301eff0e90a727005d364ebc2e9a7ffaecd0a3ef (patch) | |
tree | fe2c7f67b3827b807b09c0fc92b8e73141474f37 | |
parent | 4afb155db2d9aaafe8dd1517e9619e6bd9c95751 (diff) | |
download | tor-301eff0e90a727005d364ebc2e9a7ffaecd0a3ef.tar.gz tor-301eff0e90a727005d364ebc2e9a7ffaecd0a3ef.zip |
fuzzing: Add copyright notices and whitespace fixes
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | src/test/fuzz/fuzz_descriptor.c | 2 | ||||
-rw-r--r-- | src/test/fuzz/fuzz_extrainfo.c | 2 | ||||
-rw-r--r-- | src/test/fuzz/fuzz_http.c | 2 | ||||
-rw-r--r-- | src/test/fuzz/fuzz_microdesc.c | 2 | ||||
-rw-r--r-- | src/test/fuzz/fuzzing.h | 3 | ||||
-rw-r--r-- | src/test/fuzz/fuzzing_common.c | 6 |
7 files changed, 15 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 2e853d4108..5204830864 100644 --- a/Makefile.am +++ b/Makefile.am @@ -190,6 +190,7 @@ if USE_PERL $(top_srcdir)/src/common/*.[ch] \ $(top_srcdir)/src/or/*.[ch] \ $(top_srcdir)/src/test/*.[ch] \ + $(top_srcdir)/src/test/*/*.[ch] \ $(top_srcdir)/src/tools/*.[ch] endif diff --git a/src/test/fuzz/fuzz_descriptor.c b/src/test/fuzz/fuzz_descriptor.c index 563787b7cc..d19386d77f 100644 --- a/src/test/fuzz/fuzz_descriptor.c +++ b/src/test/fuzz/fuzz_descriptor.c @@ -1,3 +1,5 @@ +/* Copyright (c) 2016, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ #define ROUTERPARSE_PRIVATE #include "or.h" #include "routerparse.h" diff --git a/src/test/fuzz/fuzz_extrainfo.c b/src/test/fuzz/fuzz_extrainfo.c index 6bfc425a9a..6251e606d0 100644 --- a/src/test/fuzz/fuzz_extrainfo.c +++ b/src/test/fuzz/fuzz_extrainfo.c @@ -1,3 +1,5 @@ +/* Copyright (c) 2016, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ #define ROUTERPARSE_PRIVATE #include "or.h" #include "routerparse.h" diff --git a/src/test/fuzz/fuzz_http.c b/src/test/fuzz/fuzz_http.c index 15d3726763..f069900a2c 100644 --- a/src/test/fuzz/fuzz_http.c +++ b/src/test/fuzz/fuzz_http.c @@ -37,7 +37,6 @@ mock_directory_handle_command_get(dir_connection_t *conn, if (headers) { log_debug(LD_GENERAL, "Header-Length:\n%zu\n", strlen(headers)); log_debug(LD_GENERAL, "Headers:\n%s\n", headers); - } log_debug(LD_GENERAL, "Body-Length:\n%zu\n", body_len); @@ -130,3 +129,4 @@ fuzz_main(const uint8_t *stdin_buf, size_t data_size) return 0; } + diff --git a/src/test/fuzz/fuzz_microdesc.c b/src/test/fuzz/fuzz_microdesc.c index bb944595fe..bb89546191 100644 --- a/src/test/fuzz/fuzz_microdesc.c +++ b/src/test/fuzz/fuzz_microdesc.c @@ -1,3 +1,5 @@ +/* Copyright (c) 2016, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ #define ROUTERPARSE_PRIVATE #include "or.h" #include "routerparse.h" diff --git a/src/test/fuzz/fuzzing.h b/src/test/fuzz/fuzzing.h index a8cbb1d9e8..4295743458 100644 --- a/src/test/fuzz/fuzzing.h +++ b/src/test/fuzz/fuzzing.h @@ -1,3 +1,5 @@ +/* Copyright (c) 2016, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ #ifndef FUZZING_H #define FUZZING_H @@ -8,3 +10,4 @@ int fuzz_main(const uint8_t *data, size_t sz); void disable_signature_checking(void); #endif /* FUZZING_H */ + diff --git a/src/test/fuzz/fuzzing_common.c b/src/test/fuzz/fuzzing_common.c index 54a792353d..57c3cf52cf 100644 --- a/src/test/fuzz/fuzzing_common.c +++ b/src/test/fuzz/fuzzing_common.c @@ -1,3 +1,5 @@ +/* Copyright (c) 2016, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ #define CRYPTO_ED25519_PRIVATE #include "orconfig.h" #include "or.h" @@ -78,7 +80,6 @@ mock_ed25519_impl_spot_check__nocheck(void) return 0; } - void disable_signature_checking(void) { @@ -93,7 +94,8 @@ disable_signature_checking(void) #ifdef LLVM_FUZZ int -LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { +LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) +{ static int initialized = 0; if (!initialized) { if (fuzz_init() < 0) |