mirror of
https://github.com/espressif/openthread.git
synced 2026-07-23 20:44:07 +00:00
[fuzz] avoid tasklet execution if platform was reset (#4093)
This commit is contained in:
@@ -40,11 +40,9 @@
|
||||
#include <openthread/thread_ftd.h>
|
||||
#include <openthread/platform/uart.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;
|
||||
@@ -69,6 +67,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
|
||||
otPlatUartReceived(buf, (uint16_t)size);
|
||||
|
||||
VerifyOrExit(!FuzzerPlatformResetWasRequested());
|
||||
|
||||
for (int i = 0; i < MAX_ITERATIONS; i++)
|
||||
{
|
||||
while (otTaskletsArePending(instance))
|
||||
|
||||
Reference in New Issue
Block a user