Index: src/log-utils.cc |
diff --git a/src/log-utils.cc b/src/log-utils.cc |
index f280bfbe28a2a3ecc853cf5620b1a42d39fca5a0..dcb4b499e6555ec1741506f8d1c347b145056dc2 100644 |
--- a/src/log-utils.cc |
+++ b/src/log-utils.cc |
@@ -316,7 +316,9 @@ void LogMessageBuilder::AppendStringPart(const char* str, int len) { |
ASSERT(len >= 0); |
if (len == 0) return; |
} |
- strncpy(Log::message_buffer_ + pos_, str, len); |
+ Vector<char> buf(Log::message_buffer_ + pos_, |
+ Log::kMessageBufferSize - pos_); |
+ OS::StrNCpy(buf, str, len); |
pos_ += len; |
ASSERT(pos_ <= Log::kMessageBufferSize); |
} |