From d7a3e8ec24958958db28dba44542a2c126d94e88 Mon Sep 17 00:00:00 2001 From: "cevans@chromium.org" Date: Fri, 1 Jan 2010 22:16:38 +0000 Subject: If we can't read a unicode character, write the standard "unknown" (0xFFFD) character. This will prevent security issues where the current behaviour can be used to strip characters out of a string after it has passed some validation. BUG=30798 TEST=utf_string_conversions_unittest.cc,utf_offset_string_conversions_unittest.cc,zip_unittest.cc Review URL: http://codereview.chromium.org/522029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35430 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/file_stream_posix.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/base/file_stream_posix.cc') diff --git a/net/base/file_stream_posix.cc b/net/base/file_stream_posix.cc index f039996..eda0927 100644 --- a/net/base/file_stream_posix.cc +++ b/net/base/file_stream_posix.cc @@ -329,7 +329,7 @@ int FileStream::Open(const FilePath& path, int open_flags) { } open_flags_ = open_flags; - file_ = base::CreatePlatformFile(path.ToWStringHack(), open_flags_, NULL); + file_ = base::CreatePlatformFile(path, open_flags_, NULL); if (file_ == base::kInvalidPlatformFileValue) { LOG(WARNING) << "Failed to open file: " << errno << " (" << path.ToWStringHack() << ")"; -- cgit v1.1