mirror of
https://github.com/espressif/openthread.git
synced 2026-07-27 22:37:45 +00:00
[fuzz] avoid tasklet execution if platform was reset (#4093)
This commit is contained in:
@@ -38,11 +38,9 @@
|
||||
#include <openthread/thread.h>
|
||||
#include <openthread/thread_ftd.h>
|
||||
|
||||
#include "fuzzer_platform.h"
|
||||
#include "common/code_utils.hpp"
|
||||
|
||||
extern "C" void FuzzerPlatformInit(void);
|
||||
extern "C" void FuzzerPlatformProcess(otInstance *aInstance);
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
{
|
||||
const otPanId panId = 0xdead;
|
||||
@@ -75,6 +73,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
|
||||
message = NULL;
|
||||
|
||||
VerifyOrExit(!FuzzerPlatformResetWasRequested());
|
||||
|
||||
for (int i = 0; i < MAX_ITERATIONS; i++)
|
||||
{
|
||||
while (otTaskletsArePending(instance))
|
||||
|
||||
Reference in New Issue
Block a user