1
0
mirror of https://github.com/armink/EasyLogger.git synced 2025-01-19 15:52:53 +08:00

Merge pull request #19 from XXXXzzzz000/master

[修复]溢出错误
This commit is contained in:
朱天龙 (Armink) 2018-06-04 13:09:40 +08:00 committed by GitHub
commit 5365940bd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -510,7 +510,7 @@ void elog_output(uint8_t level, const char *tag, const char *file, const char *f
} else {
log_len = ELOG_LINE_BUF_SIZE;
/* copy newline sign */
strcpy(log_buf + ELOG_LINE_BUF_SIZE - newline_len, ELOG_NEWLINE_SIGN);
strcpy(log_buf + ELOG_LINE_BUF_SIZE - (newline_len + 1), ELOG_NEWLINE_SIGN);
}
/* output log */
#if defined(ELOG_ASYNC_OUTPUT_ENABLE)