Skip to content

Commit

Permalink
[link-metrics] fix race condition (#9986)
Browse files Browse the repository at this point in the history
  • Loading branch information
Irving-cl authored Apr 2, 2024
1 parent d099d78 commit 0e36799
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/mac/mac_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1220,9 +1220,11 @@ void Frame::SetEnhAckProbingIe(const uint8_t *aValue, uint8_t aLen)
{
uint8_t *cur = GetThreadIe(ThreadIe::kEnhAckProbingIe);

OT_ASSERT(cur != nullptr);

VerifyOrExit(cur != nullptr);
memcpy(cur + sizeof(HeaderIe) + sizeof(VendorIeHeader), aValue, aLen);

exit:
return;
}
#endif // OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE

Expand Down

0 comments on commit 0e36799

Please sign in to comment.