From 362f97df1e6284387d6172f076acd4b187323a9e Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Mon, 4 Feb 2019 10:52:00 -0800 Subject: [PATCH] [fuzz] return valid radio transmit buffer (#3549) --- tests/fuzz/fuzzer_platform.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/fuzz/fuzzer_platform.c b/tests/fuzz/fuzzer_platform.c index d9f4edf25..a1e643523 100644 --- a/tests/fuzz/fuzzer_platform.c +++ b/tests/fuzz/fuzzer_platform.c @@ -37,7 +37,9 @@ #include #include -static uint32_t sRandomState = 1; +static uint32_t sRandomState = 1; +static uint8_t sRadioTransmitPsdu[OT_RADIO_FRAME_MAX_SIZE]; +static otRadioFrame sRadioTransmitFrame = {.mPsdu = sRadioTransmitPsdu}; void FuzzerPlatformInit(void) { @@ -198,7 +200,7 @@ otError otPlatRadioGetTransmitPower(otInstance *aInstance, int8_t *aPower) otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance) { (void)aInstance; - return NULL; + return &sRadioTransmitFrame; } int8_t otPlatRadioGetRssi(otInstance *aInstance)