[tor-commits] [tor/main] Remove fuzz_hexdigest.c: It is already covered by other fuzzers

nickm at torproject.org nickm at torproject.org
Mon Jul 12 20:27:02 UTC 2021


commit c63541a0b08dceb23c48cd9be1559b628f73b428
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Jul 12 15:42:32 2021 -0400

    Remove fuzz_hexdigest.c: It is already covered by other fuzzers
---
 scripts/codegen/fuzzing_include_am.py |  1 -
 src/test/fuzz/fuzz_hexdigest.c        | 72 -----------------------------------
 src/test/fuzz/include.am              | 29 --------------
 3 files changed, 102 deletions(-)

diff --git a/scripts/codegen/fuzzing_include_am.py b/scripts/codegen/fuzzing_include_am.py
index 4c0b01576e..95436a5a93 100755
--- a/scripts/codegen/fuzzing_include_am.py
+++ b/scripts/codegen/fuzzing_include_am.py
@@ -6,7 +6,6 @@ from __future__ import print_function
 from __future__ import unicode_literals
 
 FUZZERS = """
-	hexdigest
 	address
 	addressPTR
 	consensus
diff --git a/src/test/fuzz/fuzz_hexdigest.c b/src/test/fuzz/fuzz_hexdigest.c
deleted file mode 100644
index 376c77f35a..0000000000
--- a/src/test/fuzz/fuzz_hexdigest.c
+++ /dev/null
@@ -1,72 +0,0 @@
-#include "core/or/or.h"
-
-#include "app/config/config.h"
-#include "core/mainloop/connection.h"
-#include "core/mainloop/mainloop.h"
-#include "core/or/circuitlist.h"
-#include "core/or/circuituse.h"
-#include "core/or/extendinfo.h"
-#include "core/or/policies.h"
-#include "feature/client/bridges.h"
-#include "feature/control/control_events.h"
-#include "feature/dirauth/authmode.h"
-#include "feature/dirauth/process_descs.h"
-#include "feature/dirauth/reachability.h"
-#include "feature/dircache/dirserv.h"
-#include "feature/dirclient/dirclient.h"
-#include "feature/dirclient/dirclient_modes.h"
-#include "feature/dirclient/dlstatus.h"
-#include "feature/dircommon/directory.h"
-#include "feature/nodelist/authcert.h"
-#include "feature/nodelist/describe.h"
-#include "feature/nodelist/dirlist.h"
-#include "feature/nodelist/microdesc.h"
-#include "feature/nodelist/networkstatus.h"
-#include "feature/nodelist/node_select.h"
-#include "feature/nodelist/nodelist.h"
-#include "feature/nodelist/routerinfo.h"
-#include "feature/nodelist/routerlist.h"
-#include "feature/dirparse/routerparse.h"
-#include "feature/nodelist/routerset.h"
-#include "feature/nodelist/torcert.h"
-#include "feature/relay/routermode.h"
-#include "feature/relay/relay_find_addr.h"
-#include "feature/stats/rephist.h"
-#include "lib/crypt_ops/crypto_format.h"
-#include "lib/crypt_ops/crypto_rand.h"
-
-#include "feature/dircommon/dir_connection_st.h"
-#include "feature/dirclient/dir_server_st.h"
-#include "feature/nodelist/document_signature_st.h"
-#include "feature/nodelist/extrainfo_st.h"
-#include "feature/nodelist/networkstatus_st.h"
-#include "feature/nodelist/networkstatus_voter_info_st.h"
-#include "feature/nodelist/node_st.h"
-#include "feature/nodelist/routerinfo_st.h"
-#include "feature/nodelist/routerlist_st.h"
-#include "feature/nodelist/vote_routerstatus_st.h"
-
-#include "lib/crypt_ops/digestset.h"
-
-#include "test/fuzz/fuzzing.h"
-
-
-int fuzz_init(void)
-{
- return 0;
-}
-
-int fuzz_cleanup(void)
-{
- return 0;
-}
-
-int fuzz_main(const uint8_t *data, size_t sz)
-{
-	char *fuzzing_data = tor_memdup_nulterm(data, sz);
-	char digest[20];
-
-	hexdigest_to_digest(fuzzing_data, digest);
-	tor_free(fuzzing_data);
-	return 0;
-}
diff --git a/src/test/fuzz/include.am b/src/test/fuzz/include.am
index a6f6cbb58f..951eb04e6b 100644
--- a/src/test/fuzz/include.am
+++ b/src/test/fuzz/include.am
@@ -102,16 +102,6 @@ src_test_fuzz_fuzz_extrainfo_LDFLAGS = $(FUZZING_LDFLAG)
 src_test_fuzz_fuzz_extrainfo_LDADD = $(FUZZING_LIBS)
 endif
 
-if UNITTESTS_ENABLED
-src_test_fuzz_fuzz_hexdigest_SOURCES = \
-	src/test/fuzz/fuzzing_common.c \
-	src/test/fuzz/fuzz_hexdigest.c
-src_test_fuzz_fuzz_hexdigest_CPPFLAGS = $(FUZZING_CPPFLAGS)
-src_test_fuzz_fuzz_hexdigest_CFLAGS = $(FUZZING_CFLAGS)
-src_test_fuzz_fuzz_hexdigest_LDFLAGS = $(FUZZING_LDFLAG)
-src_test_fuzz_fuzz_hexdigest_LDADD = $(FUZZING_LIBS)
-endif
-
 if UNITTESTS_ENABLED
 src_test_fuzz_fuzz_hsdescv3_SOURCES = \
 	src/test/fuzz/fuzzing_common.c \
@@ -191,7 +181,6 @@ FUZZERS = \
 	src/test/fuzz/fuzz-diff \
 	src/test/fuzz/fuzz-diff-apply \
 	src/test/fuzz/fuzz-extrainfo \
-	src/test/fuzz/fuzz-hexdigest \
 	src/test/fuzz/fuzz-hsdescv3 \
 	src/test/fuzz/fuzz-http \
 	src/test/fuzz/fuzz-http-connect \
@@ -267,15 +256,6 @@ src_test_fuzz_lf_fuzz_extrainfo_LDFLAGS = $(LIBFUZZER_LDFLAG)
 src_test_fuzz_lf_fuzz_extrainfo_LDADD = $(LIBFUZZER_LIBS)
 endif
 
-if UNITTESTS_ENABLED
-src_test_fuzz_lf_fuzz_hexdigest_SOURCES = \
-	$(src_test_fuzz_fuzz_hexdigest_SOURCES)
-src_test_fuzz_lf_fuzz_hexdigest_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
-src_test_fuzz_lf_fuzz_hexdigest_CFLAGS = $(LIBFUZZER_CFLAGS)
-src_test_fuzz_lf_fuzz_hexdigest_LDFLAGS = $(LIBFUZZER_LDFLAG)
-src_test_fuzz_lf_fuzz_hexdigest_LDADD = $(LIBFUZZER_LIBS)
-endif
-
 if UNITTESTS_ENABLED
 src_test_fuzz_lf_fuzz_hsdescv3_SOURCES = \
 	$(src_test_fuzz_fuzz_hsdescv3_SOURCES)
@@ -347,7 +327,6 @@ LIBFUZZER_FUZZERS = \
 	src/test/fuzz/lf-fuzz-diff \
 	src/test/fuzz/lf-fuzz-diff-apply \
 	src/test/fuzz/lf-fuzz-extrainfo \
-	src/test/fuzz/lf-fuzz-hexdigest \
 	src/test/fuzz/lf-fuzz-hsdescv3 \
 	src/test/fuzz/lf-fuzz-http \
 	src/test/fuzz/lf-fuzz-http-connect \
@@ -412,13 +391,6 @@ src_test_fuzz_liboss_fuzz_extrainfo_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
 src_test_fuzz_liboss_fuzz_extrainfo_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
 endif
 
-if UNITTESTS_ENABLED
-src_test_fuzz_liboss_fuzz_hexdigest_a_SOURCES = \
-	$(src_test_fuzz_fuzz_hexdigest_SOURCES)
-src_test_fuzz_liboss_fuzz_hexdigest_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
-src_test_fuzz_liboss_fuzz_hexdigest_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
-endif
-
 if UNITTESTS_ENABLED
 src_test_fuzz_liboss_fuzz_hsdescv3_a_SOURCES = \
 	$(src_test_fuzz_fuzz_hsdescv3_SOURCES)
@@ -476,7 +448,6 @@ OSS_FUZZ_FUZZERS = \
 	src/test/fuzz/liboss-fuzz-diff.a \
 	src/test/fuzz/liboss-fuzz-diff-apply.a \
 	src/test/fuzz/liboss-fuzz-extrainfo.a \
-	src/test/fuzz/liboss-fuzz-hexdigest.a \
 	src/test/fuzz/liboss-fuzz-hsdescv3.a \
 	src/test/fuzz/liboss-fuzz-http.a \
 	src/test/fuzz/liboss-fuzz-http-connect.a \





More information about the tor-commits mailing list