commit | 7359c5b10b5580ef5a8069a10ece874923033d90 | [log] [tgz] |
---|---|---|
author | Leandro Pereira <leandro.pereira@intel.com> | Wed May 09 14:01:29 2018 -0700 |
committer | Andrew Boie <andrewboie@gmail.com> | Thu May 10 14:17:35 2018 -0700 |
tree | b3326a04bb6fca806ff76e8b89f87fb58d5be4a4 | |
parent | abf77ef75337b85968b9270da3b0953844955b74 [diff] |
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: Leandro Pereira <leandro.pereira@intel.com>