| Index: chrome/common/metrics_log_manager.cc
|
| ===================================================================
|
| --- chrome/common/metrics_log_manager.cc (revision 107404)
|
| +++ chrome/common/metrics_log_manager.cc (working copy)
|
| @@ -105,9 +105,10 @@
|
| void MetricsLogManager::CompressStagedLog() {
|
| int text_size = staged_log_->GetEncodedLogSize();
|
| std::string staged_log_text;
|
| - // Leave room for the NULL terminator.
|
| - staged_log_->GetEncodedLog(WriteInto(&staged_log_text, text_size + 1),
|
| - text_size);
|
| + if (text_size > 0) {
|
| + staged_log_->GetEncodedLog(WriteInto(&staged_log_text, text_size + 1),
|
| + text_size);
|
| + }
|
|
|
| bool success = Bzip2Compress(staged_log_text, &compressed_staged_log_text_);
|
| if (success) {
|
|
|