diff --git a/examples/all-clusters-app/linux/fuzzing-main.cpp b/examples/all-clusters-app/linux/fuzzing-main.cpp index b1736826ef335a..4fe21865727371 100644 --- a/examples/all-clusters-app/linux/fuzzing-main.cpp +++ b/examples/all-clusters-app/linux/fuzzing-main.cpp @@ -18,9 +18,17 @@ #include "AppMain.h" #include +#include + using namespace chip; using namespace chip::DeviceLayer; +namespace { + +LinuxCommissionableDataProvider gCommissionableDataProvider; + +} + void CleanShutdown() { Server::GetInstance().Shutdown(); @@ -40,6 +48,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t * aData, size_t aSize) VerifyOrDie(Platform::MemoryInit() == CHIP_NO_ERROR); VerifyOrDie(PlatformMgr().InitChipStack() == CHIP_NO_ERROR); + VerifyOrDie(chip::examples::InitCommissionableDataProvider(gCommissionableDataProvider, + LinuxDeviceOptions::GetInstance()) == CHIP_NO_ERROR); + SetCommissionableDataProvider(&gCommissionableDataProvider); + // ChipLinuxAppMainLoop blocks, and we don't want that here. static chip::CommonCaseDeviceServerInitParams initParams; (void) initParams.InitializeStaticResourcesBeforeServerInit();