Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3832)

Unified Diff: chrome/common/metrics_log_manager.cc

Issue 8418034: Make string_util::WriteInto() DCHECK() that the supplied |length_with_null| > 1, meaning that the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_win.cc ('k') | chrome/common/time_format.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/metrics_log_manager.cc
===================================================================
--- chrome/common/metrics_log_manager.cc (revision 111826)
+++ chrome/common/metrics_log_manager.cc (working copy)
@@ -105,7 +105,7 @@
void MetricsLogManager::CompressStagedLog() {
int text_size = staged_log_->GetEncodedLogSize();
std::string staged_log_text;
- // Leave room for the NULL terminator.
+ DCHECK_GT(text_size, 0);
staged_log_->GetEncodedLog(WriteInto(&staged_log_text, text_size + 1),
text_size);
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_win.cc ('k') | chrome/common/time_format.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698