mirror of
https://github.com/espressif/openthread.git
synced 2026-10-20 22:48:17 +00:00
[coap-message] fix buffer overflow in AppendUintOption() (#6163)
This commit is contained in:
@@ -200,7 +200,7 @@ otError Message::AppendUintOption(uint16_t aNumber, uint32_t aValue)
|
|||||||
|
|
||||||
Encoding::BigEndian::WriteUint32(aValue, buffer);
|
Encoding::BigEndian::WriteUint32(aValue, buffer);
|
||||||
|
|
||||||
while (value[0] == 0 && length > 0)
|
while ((length > 0) && (value[0] == 0))
|
||||||
{
|
{
|
||||||
value++;
|
value++;
|
||||||
length--;
|
length--;
|
||||||
|
|||||||
Reference in New Issue
Block a user