diff options
author | Abtin Keshavarzian <abtink@google.com> | 2024-04-05 11:18:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-05 11:18:41 -0700 |
commit | b146766e3a485ffc860968673fe818c23a8bed93 (patch) | |
tree | 0d968226f8087c07a68c96e220c9844ac7eebc32 | |
parent | e3f97e2362cf0d4f7fbea6e19014bc03751a7c2f (diff) | |
download | openthread-b146766e3a485ffc860968673fe818c23a8bed93.tar.gz |
[plat-utils] enhance `otMacFrameDoesAddrMatch()` (#9997)
This commit updates `otMacFrameDoesAddrMatch()` to ensure it
does not match if frame is malformed (`Frame::GetDstAddr()`
fails).
-rw-r--r-- | examples/platforms/utils/mac_frame.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/platforms/utils/mac_frame.cpp b/examples/platforms/utils/mac_frame.cpp index 0ae88db34..36a1c975c 100644 --- a/examples/platforms/utils/mac_frame.cpp +++ b/examples/platforms/utils/mac_frame.cpp @@ -43,7 +43,7 @@ bool otMacFrameDoesAddrMatch(const otRadioFrame *aFrame, Mac::Address dst; Mac::PanId panid; - SuccessOrExit(frame.GetDstAddr(dst)); + VerifyOrExit(frame.GetDstAddr(dst) == kErrorNone, rval = false); switch (dst.GetType()) { |