Skip to content
Commit 7359c5b1 authored by Leandro Pereira's avatar Leandro Pereira Committed by Andrew Boie
Browse files

net: lwm2m: Do not use snprintk() to get debugging token



It's highly unlikely that snprintk() will return a negative value, but
that's a possibility that will make the `pos` variable be set to a
value outside the boundaries of the statically allocated `buf` array.

Also clamp writes to ensure that the statically allocated buffer won't
be overwritten with a large token length.

Fixes #7070.

Signed-off-by: default avatarLeandro Pereira <leandro.pereira@intel.com>
parent abf77ef7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment