Skip to content

Commit

Permalink
Fix logging of potentially unterminated string.
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Bertin <sbertin@telular.com>
  • Loading branch information
sbertin-telular committed Feb 13, 2019
1 parent e6271c2 commit ec6fb12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ void lwm2m_data_encode_nstring(const char * string,
size_t length,
lwm2m_data_t * dataP)
{
LOG_ARG("length: %d, string: \"%s\"", length, string);
LOG_ARG("length: %d, string: \"%.*s\"", length, length, string);
lwm2m_data_encode_opaque((uint8_t *)string, length, dataP);

if (dataP->type == LWM2M_TYPE_OPAQUE)
Expand Down

0 comments on commit ec6fb12

Please sign in to comment.