Skip to content
Snippets Groups Projects
Commit 301eff0e authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

fuzzing: Add copyright notices and whitespace fixes

parent 4afb155d
No related branches found
No related tags found
No related merge requests found
...@@ -190,6 +190,7 @@ if USE_PERL ...@@ -190,6 +190,7 @@ if USE_PERL
$(top_srcdir)/src/common/*.[ch] \ $(top_srcdir)/src/common/*.[ch] \
$(top_srcdir)/src/or/*.[ch] \ $(top_srcdir)/src/or/*.[ch] \
$(top_srcdir)/src/test/*.[ch] \ $(top_srcdir)/src/test/*.[ch] \
$(top_srcdir)/src/test/*/*.[ch] \
$(top_srcdir)/src/tools/*.[ch] $(top_srcdir)/src/tools/*.[ch]
endif endif
......
/* Copyright (c) 2016, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE #define ROUTERPARSE_PRIVATE
#include "or.h" #include "or.h"
#include "routerparse.h" #include "routerparse.h"
......
/* Copyright (c) 2016, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE #define ROUTERPARSE_PRIVATE
#include "or.h" #include "or.h"
#include "routerparse.h" #include "routerparse.h"
......
...@@ -37,7 +37,6 @@ mock_directory_handle_command_get(dir_connection_t *conn, ...@@ -37,7 +37,6 @@ mock_directory_handle_command_get(dir_connection_t *conn,
if (headers) { if (headers) {
log_debug(LD_GENERAL, "Header-Length:\n%zu\n", strlen(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, "Headers:\n%s\n", headers);
} }
log_debug(LD_GENERAL, "Body-Length:\n%zu\n", body_len); 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) ...@@ -130,3 +129,4 @@ fuzz_main(const uint8_t *stdin_buf, size_t data_size)
return 0; return 0;
} }
/* Copyright (c) 2016, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE #define ROUTERPARSE_PRIVATE
#include "or.h" #include "or.h"
#include "routerparse.h" #include "routerparse.h"
......
/* Copyright (c) 2016, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#ifndef FUZZING_H #ifndef FUZZING_H
#define FUZZING_H #define FUZZING_H
...@@ -8,3 +10,4 @@ int fuzz_main(const uint8_t *data, size_t sz); ...@@ -8,3 +10,4 @@ int fuzz_main(const uint8_t *data, size_t sz);
void disable_signature_checking(void); void disable_signature_checking(void);
#endif /* FUZZING_H */ #endif /* FUZZING_H */
/* Copyright (c) 2016, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define CRYPTO_ED25519_PRIVATE #define CRYPTO_ED25519_PRIVATE
#include "orconfig.h" #include "orconfig.h"
#include "or.h" #include "or.h"
...@@ -78,7 +80,6 @@ mock_ed25519_impl_spot_check__nocheck(void) ...@@ -78,7 +80,6 @@ mock_ed25519_impl_spot_check__nocheck(void)
return 0; return 0;
} }
void void
disable_signature_checking(void) disable_signature_checking(void)
{ {
...@@ -93,7 +94,8 @@ disable_signature_checking(void) ...@@ -93,7 +94,8 @@ disable_signature_checking(void)
#ifdef LLVM_FUZZ #ifdef LLVM_FUZZ
int int
LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
static int initialized = 0; static int initialized = 0;
if (!initialized) { if (!initialized) {
if (fuzz_init() < 0) if (fuzz_init() < 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment