This is an automated email from the ASF dual-hosted git repository. jerpelea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 2466c07aa3 libc/stream: fix syslogstream_addstring length error 2466c07aa3 is described below commit 2466c07aa3baf3fc96837b5c85685f068751ad8c Author: yinshengkai <yinsheng...@xiaomi.com> AuthorDate: Mon Jan 30 17:05:29 2023 +0800 libc/stream: fix syslogstream_addstring length error Signed-off-by: yinshengkai <yinsheng...@xiaomi.com> --- libs/libc/stream/lib_syslogstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/libc/stream/lib_syslogstream.c b/libs/libc/stream/lib_syslogstream.c index 528f539974..9566d7cbbc 100644 --- a/libs/libc/stream/lib_syslogstream.c +++ b/libs/libc/stream/lib_syslogstream.c @@ -112,7 +112,7 @@ static int syslogstream_addstring(FAR struct lib_syslogstream_s *stream, do { int remain = CONFIG_IOB_BUFSIZE - iob->io_len; - remain = remain > len ? len : remain; + remain = remain > len - ret ? len - ret : remain; memcpy(iob->io_data + iob->io_len, buff + ret, remain); iob->io_len += remain; ret += remain;