mirror of
https://github.com/espressif/openthread.git
synced 2026-07-27 22:37:45 +00:00
[coap] change assert to avoid index out-of-bounds warning (#3464)
This commit is contained in:
@@ -317,8 +317,9 @@ otError Message::ParseHeader(void)
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
|
||||
assert(mBuffer.mHead.mData + mBuffer.mHead.mInfo.mReserved >=
|
||||
reinterpret_cast<uint8_t *>(&GetHelpData()) + sizeof(GetHelpData()));
|
||||
assert(mBuffer.mHead.mInfo.mReserved >=
|
||||
sizeof(GetHelpData()) +
|
||||
static_cast<size_t>((reinterpret_cast<uint8_t *>(&GetHelpData()) - mBuffer.mHead.mData)));
|
||||
|
||||
memset(&GetHelpData(), 0, sizeof(GetHelpData()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user