This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit e6cda62249f21e99bc9fee7a7cbcda9f9f444b72 Author: huojianchao <[email protected]> AuthorDate: Wed Nov 11 20:19:41 2026 +0800 drivers/note: keep the printf note length within nc_length sched_note_vprintf_ip() let the arguments use all of its 256-byte buffer. When a string argument filled it, the note was 256 bytes long and was recorded with nc_length 0, which the readers of the note stream cannot step over. Leave the last byte of the buffer unused, as sched_note_event_ip() does, so that a note is at most 255 bytes. Signed-off-by: huojianchao <[email protected]> --- drivers/note/note_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/note/note_driver.c b/drivers/note/note_driver.c index 1b39003c4db..86f8e83546a 100644 --- a/drivers/note/note_driver.c +++ b/drivers/note/note_driver.c @@ -1593,7 +1593,7 @@ void sched_note_vprintf_ip(uint32_t tag, uintptr_t ip, FAR const char *fmt, formatted = true; note = (FAR struct note_printf_s *)data; - length = sizeof(data) - SIZEOF_NOTE_PRINTF(0); + length = sizeof(data) - 1 - SIZEOF_NOTE_PRINTF(0); if (type) {
