commit | bb1a52547cd6059040655d4ed84b02407ddb0f33 | [log] [tgz] |
---|---|---|
author | Li Cao <irvingcl@google.com> | Wed Apr 03 02:42:56 2024 +0800 |
committer | Jiaming (Charlie) Wang <jiamingw@google.com> | Wed Apr 17 17:27:07 2024 +0000 |
tree | 108a59c0f4f71028c3c593a2d4f15c4b084d6718 | |
parent | cafef38edc11573db8ac4a02797e7959ef22f96f [diff] |
[link-metrics] fix race condition (#9986) The CL cherry-picks the fix of link metrics race condition. Bug: 331743760 Test: None Change-Id: Id3efcea4ad322293d25048eec936c66b0add3eab Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/openthread/+/1030332 Reviewed-by: Sundarajan Srinivasan <sundarsrini@google.com>
diff --git a/src/core/mac/mac_frame.cpp b/src/core/mac/mac_frame.cpp index 3e84465..9946bb2 100644 --- a/src/core/mac/mac_frame.cpp +++ b/src/core/mac/mac_frame.cpp
@@ -1220,9 +1220,11 @@ { 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