diff --git a/src/logging.cc b/src/logging.cc index ddcf910..be36117 100644 --- a/src/logging.cc +++ b/src/logging.cc @@ -1509,6 +1509,7 @@ void LogMessage::Flush() { original_final_char = data_->message_text_[data_->num_chars_to_log_]; data_->message_text_[data_->num_chars_to_log_++] = '\n'; } + data_->message_text_[data_->num_chars_to_log_] = '\0'; // Prevent any subtle race conditions by wrapping a mutex lock around // the actual logging action per se.