Skip to content

Commit

Permalink
Optimize yasd log info
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghantao committed Jan 4, 2021
1 parent b3d884a commit 1e35b1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void Logger::put(int level, const char *content, size_t length) {

// TODO(codinghuang): seems there are "buffer overflow detected" problem
if (length > YASD_MSG_SIZE) {
yasd::Util::printfln_info(yasd::Color::YASD_ECHO_RED, "length is greater than the YASD_MSG_SIZE");
yasd::Util::printfln_info(yasd::Color::YASD_ECHO_YELLOW, "[yasd] length is greater than the YASD_MSG_SIZE");
length = YASD_MSG_SIZE;
}
memcpy(yasd_info_buf, content, length);
Expand Down

0 comments on commit 1e35b1b

Please sign in to comment.