diff --git a/.code-intelligence/fuzz_targets/fuzz_parser.cpp b/.code-intelligence/fuzz_targets/fuzz_parser.cpp index 0bafcea..a5a8d2d 100644 --- a/.code-intelligence/fuzz_targets/fuzz_parser.cpp +++ b/.code-intelligence/fuzz_targets/fuzz_parser.cpp @@ -5,8 +5,15 @@ #include #include -#include "file_input.h" +const char* write_to_file(const uint8_t *Data, size_t Size) { + const char* filename = "/tmp/fuzz_input"; + FILE *fp; + fp = fopen(filename, "w+"); + fwrite(Data, Size, 1, fp); + fclose(fp); + return filename; +} static void test_parsing(parser_handle_t parser){ if (parser->show_info != NULL) @@ -99,15 +106,13 @@ extern "C" int FUZZ_INIT() { return 0; } - - extern "C" int FUZZ(const uint8_t *Data, size_t Size) { - auto file = ci::input_file(Data, Size); + auto file = write_to_file(Data, Size); - test_parser(file.name(), (const int8_t *)"aac"); - test_parser(file.name(), (const int8_t *)"ac3"); - test_parser(file.name(), (const int8_t *)"ec3"); - test_parser(file.name(), (const int8_t *)"avc"); + test_parser(file, (const int8_t *)"aac"); + test_parser(file, (const int8_t *)"ac3"); + test_parser(file, (const int8_t *)"ec3"); + test_parser(file, (const int8_t *)"avc"); return 0; } diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 0e75d27..03cde72 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -31,7 +31,7 @@ jobs: test_collection_run: ${{ steps.start-fuzzing.outputs.test_collection_run }} fuzzing_server_address: ${{ env.FUZZING_SERVER_ADDRESS }} dashboard_address: ${{ env.WEB_APP_ADDRESS }} - timeout: 1800 + timeout: 300 - id: save-results name: Save Fuzz Test Results uses: CodeIntelligenceTesting/github-actions/save-results@v3