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

Unified Diff: chrome/common/time_format.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/common/metrics_log_manager.cc ('k') | chrome_frame/chrome_tab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/time_format.cc
===================================================================
--- chrome/common/time_format.cc (revision 111826)
+++ chrome/common/time_format.cc (working copy)
@@ -296,9 +296,9 @@
// With the fallback added, this should never fail.
DCHECK(U_SUCCESS(error));
int capacity = time_string.length() + 1;
+ DCHECK_GT(capacity, 1);
string16 result;
- time_string.extract(static_cast<UChar*>(
- WriteInto(&result, capacity)),
+ time_string.extract(static_cast<UChar*>(WriteInto(&result, capacity)),
capacity, error);
DCHECK(U_SUCCESS(error));
return result;
« no previous file with comments | « chrome/common/metrics_log_manager.cc ('k') | chrome_frame/chrome_tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698