diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2022-12-01 14:39:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-01 14:39:44 +0100 |
commit | b2a1bf413b67da674d8199efde6b97b8e7fd5c42 (patch) | |
tree | 71a0ca2bc80af4b6ebd0e6dfac4ed37e54aa4b1d /fuzz/fuzz_quic_get_crypto_data.c | |
parent | 02e7e3c23b29002267a89ae74e51c2285bb27da1 (diff) |
Remove some useless fuzzing target (#1813)
We don't need specific targets to reproduce fuzzing issues.
After all, calling `./fuzz/fuzz_process_packet_with_main $ARTIFACT_FILE`
is equivalento to `./fuzz/fuzz_process_packet $ARTIFACT_FILE`
Diffstat (limited to 'fuzz/fuzz_quic_get_crypto_data.c')
-rw-r--r-- | fuzz/fuzz_quic_get_crypto_data.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/fuzz/fuzz_quic_get_crypto_data.c b/fuzz/fuzz_quic_get_crypto_data.c index 3e16446cd..d74eb73f2 100644 --- a/fuzz/fuzz_quic_get_crypto_data.c +++ b/fuzz/fuzz_quic_get_crypto_data.c @@ -73,64 +73,3 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { return 0; } - -#ifdef BUILD_MAIN -int main(int argc, char ** argv) -{ - FILE * data_file; - long data_file_size; - uint8_t * data_buffer; - int test_retval; - - if (argc != 2) { - fprintf(stderr, "usage: %s: [data-file]\n", - (argc > 0 ? argv[0] : "fuzz_quic_get_crypto_data")); - return 1; - } - - data_file = fopen(argv[1], "r"); - if (data_file == NULL) { - perror("fopen failed"); - return 1; - } - - if (fseek(data_file, 0, SEEK_END) != 0) { - perror("fseek(SEEK_END) failed"); - fclose(data_file); - return 1; - } - - data_file_size = ftell(data_file); - if (data_file_size < 0) { - perror("ftell failed"); - fclose(data_file); - return 1; - } - - if (fseek(data_file, 0, SEEK_SET) != 0) { - perror("fseek(0, SEEK_SET) failed"); - fclose(data_file); - return 1; - } - - data_buffer = malloc(data_file_size); - if (data_buffer == NULL) { - perror("malloc failed"); - fclose(data_file); - return 1; - } - - if (fread(data_buffer, sizeof(*data_buffer), data_file_size, data_file) != (size_t)data_file_size) { - perror("fread failed"); - fclose(data_file); - free(data_buffer); - return 1; - } - - test_retval = LLVMFuzzerTestOneInput(data_buffer, data_file_size); - fclose(data_file); - free(data_buffer); - - return test_retval; -} -#endif |