net: lwm2m: Fix SenML CBOR input basename length

Server might send the whole path in the basename when doing composite
write.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
This commit is contained in:
Veijo Pesonen 2022-05-13 14:34:08 +03:00 committed by Maureen Helm
parent 082fe9733c
commit b18f93dbc4

View file

@ -47,7 +47,7 @@ struct cbor_in_fmt_data {
/* Decoded data */
struct lwm2m_senml dcd; /* Decoded data */
struct record *current;
char basename[sizeof("/65535/999/")]; /* Null terminated basename */
char basename[MAX_RESOURCE_LEN + 1]; /* Null terminated basename */
};
/* Statically allocated formatter data is shared between different threads */