Skip to content
Commit a868da85 authored by Peter Tönz's avatar Peter Tönz Committed by Stephanos Ioannidis
Browse files

net: lwm2m: Fix buffer overflow by using CONFIG_LWM2M_VERSION_1_0



By using CONFIG_LWM2M_VERSION_1_0, the function
lwm2m_engine_get_binding() returns the binding
and the queue mode bytes. Therefore the buffer
must be tree bytes long.
The issue is caused by the two inconsistent defines:

lwm2m_registry.c:
    #define BINDING_OPT_MAX_LEN 3 /* "UQ" */
lwm2m_rd_client.c:
    #define CLIENT_BINDING_LEN sizeof("U")

Signed-off-by: default avatarPeter Tönz <peter.tonz@husqvarnagroup.com>
parent 5abce9b8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment