You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2026/10/08 11:50:27 UTC
(mynewt-mcumgr) 10/14: cmd/log_mgmt: Fix buffer size used for error message
This is an automated email from the ASF dual-hosted git repository.
sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git
commit 217617331e468d19c61f724f96d8e587c7c86038
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Wed Oct 7 16:10:48 2026 +0200
cmd/log_mgmt: Fix buffer size used for error message
Entry data buffer has LOG_MGMT_CHUNK_LEN size, not LOG_MGMT_MAX_RSP_LEN.
Use correct size when formatting entry too large error message.
Assisted-by: Claude:claude-opus-5-5
---
cmd/log_mgmt/src/log_mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/log_mgmt/src/log_mgmt.c b/cmd/log_mgmt/src/log_mgmt.c
index 957c2da..e312b4c 100644
--- a/cmd/log_mgmt/src/log_mgmt.c
+++ b/cmd/log_mgmt/src/log_mgmt.c
@@ -224,7 +224,7 @@ log_mgmt_cb_encode(struct log_mgmt_entry *entry, void *arg)
*/
if (ctxt->counter == 0) {
entry->type = LOG_ETYPE_STRING;
- snprintf((char *)entry->data, LOG_MGMT_MAX_RSP_LEN,
+ snprintf((char *)entry->data, LOG_MGMT_CHUNK_LEN,
"error: entry too large (%zu bytes)", entry_len);
}