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

Unified Diff: content/browser/download/save_package_unittest.cc

Issue 11642041: Don't allow '\0' characters in FilePath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resize -> reserve in SavePackageTest Created 7 years, 11 months 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 | « base/file_path_unittest.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/save_package_unittest.cc
diff --git a/content/browser/download/save_package_unittest.cc b/content/browser/download/save_package_unittest.cc
index 89fb89a9f7df566cafbf4579fa494cefc66d04e6..a34e138c1c94c765548acc96caedeb7d9bc6602d 100644
--- a/content/browser/download/save_package_unittest.cc
+++ b/content/browser/download/save_package_unittest.cc
@@ -109,7 +109,7 @@ class SavePackageTest : public RenderViewHostImplTestHarness {
temp_dir_.path().AppendASCII("testfile_files"));
// We need to construct a path that is *almost* kMaxFilePathLength long
- long_file_name.resize(kMaxFilePathLength + long_file_name.length());
aedla 2013/01/28 11:40:15 Looks like reserve was intended here. Because othe
+ long_file_name.reserve(kMaxFilePathLength + long_file_name.length());
while (long_file_name.length() < kMaxFilePathLength)
long_file_name += long_file_name;
long_file_name.resize(
« no previous file with comments | « base/file_path_unittest.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698