diff options
| author | hathach <[email protected]> | 2025-12-12 21:38:48 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-12-12 21:38:48 +0700 |
| commit | bb1495966d189dc2fb001bc9f3b7908a02a971bb (patch) | |
| tree | 63c5044798267aa414a1073f3f7c3976cae65797 /test/fuzz/device/msc | |
| parent | 686e975e4737e668577a66213910841036422752 (diff) | |
| parent | 02da4e81c77fd7e77ff0b92c616519358c6db4ee (diff) | |
Merge branch 'refs/heads/master' into audio_open
Diffstat (limited to 'test/fuzz/device/msc')
| -rw-r--r-- | test/fuzz/device/msc/src/fuzz.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/fuzz/device/msc/src/fuzz.cc b/test/fuzz/device/msc/src/fuzz.cc index 371d49882..8981e5570 100644 --- a/test/fuzz/device/msc/src/fuzz.cc +++ b/test/fuzz/device/msc/src/fuzz.cc @@ -46,8 +46,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { std::vector<uint8_t> callback_data = provider.ConsumeBytes<uint8_t>( provider.ConsumeIntegralInRange<size_t>(0, Size)); fuzz_init(callback_data.data(), callback_data.size()); - // init device stack on configured roothub port - tud_init(BOARD_TUD_RHPORT); + tusb_rhport_init_t dev_init = { + .role = TUSB_ROLE_DEVICE, + .speed = TUSB_SPEED_AUTO + }; + tusb_init(BOARD_TUD_RHPORT, &dev_init); for (int i = 0; i < FUZZ_ITERATIONS; i++) { if (provider.remaining_bytes() == 0) { |
