mirror of
https://github.com/espressif/openthread.git
synced 2026-07-29 15:17:47 +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);
|
||||
|
||||
while (value[0] == 0 && length > 0)
|
||||
while ((length > 0) && (value[0] == 0))
|
||||
{
|
||||
value++;
|
||||
length--;
|
||||
|
||||
Reference in New Issue
Block a user