mirror of
https://github.com/espressif/openthread.git
synced 2026-08-08 19:57:46 +00:00
[utils] check whether mInfo.mTxInfo.mIeInfo is null before using it (#11238)
The simulation platform radio driver doesn't set the 'mInfo.mTxInfo.mIeInfo' field of the ACK frame. And the function 'otMacFrameUpdateTimeIe()' directly use the 'mInfo.mTxInfo.mIeInfo' field, this may cause the program crash. This commit checks whether 'mInfo.mTxInfo.mIeInfo' is null before using it and sets the 'mInfo.mTxInfo.mIeInfo' field of the ACK frame to null in simulation platform.
This commit is contained in:
@@ -420,6 +420,7 @@ void platformRadioInit(void)
|
||||
#else
|
||||
sTransmitFrame.mInfo.mTxInfo.mIeInfo = NULL;
|
||||
#endif
|
||||
sAckFrame.mInfo.mTxInfo.mIeInfo = NULL;
|
||||
|
||||
for (size_t i = 0; i <= kMaxChannel - kMinChannel; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user