Skip to content
Commit 84106f3c authored by Robert Chou's avatar Robert Chou Committed by Jukka Rissanen
Browse files

net: lwm2m: fix erroneous TLV write



Function do_write_op_tlv() uses in->inbuf and in->insize as a looping
condition to iterate through items in TLV payload and call
do_write_op_tlv_item() to update the value.

However, do_write_op_tlv_item() will override the value before calling
for fitting the usage of lwm2m_write_handler() function without restore
them. (lwm2m_write_handler() is also called by plain text/json writer
and is expecting in->inbuf is the start of buffer and in->insize as the
length of the buffer)

This will result in errors in do_write_op_tlv().

Signed-off-by: default avatarRobert Chou <robert.ch.chou@acer.com>
parent f18674a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment