LwM2M: Block transfer with TLV format does not work #34935
Labels
area: LWM2M
area: Networking
bug
The issue is a bug, or the PR is fixing a bug
priority: medium
Medium impact/importance bug
Milestone
Describe the bug
When writing an opaque resource with block transfer using the TLV format, the first block is received and interpreted correctly. The payload of the second block is interpreted by the code as a new TLV tuple, even though it doesn't repeat the TLV header. This causes the first bytes of the payload in the second block to be interpreted as a TLV header, resulting in an arbitrary type and length.
To Reproduce
Expected behavior
Blocks after the first one are properly processed and forwarded to the postwrite callback.
Impact
Block transfer is impossible, making it impossible to write opaque resources with more than 1024 bytes.
Environment (please complete the following information):
Additional context
This same issue seems to have been fixed specifically for the firmware package (5/0/0), see here. But the issue occurs on a custom opaque resource as well.
The text was updated successfully, but these errors were encountered: