summaryrefslogtreecommitdiffstats
path: root/net/base/file_stream_posix.cc
diff options
context:
space:
mode:
authorcevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-01 22:16:38 +0000
committercevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-01 22:16:38 +0000
commitd7a3e8ec24958958db28dba44542a2c126d94e88 (patch)
tree624b1ccbf82d1bd2586088d624b465c4cfa72ee8 /net/base/file_stream_posix.cc
parent4838a195200c971b1c81bddf7e483f4b95b2017a (diff)
downloadchromium_src-d7a3e8ec24958958db28dba44542a2c126d94e88.zip
chromium_src-d7a3e8ec24958958db28dba44542a2c126d94e88.tar.gz
chromium_src-d7a3e8ec24958958db28dba44542a2c126d94e88.tar.bz2
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
Diffstat (limited to 'net/base/file_stream_posix.cc')
-rw-r--r--net/base/file_stream_posix.cc2
1 files changed, 1 insertions, 1 deletions
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() << ")";