diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 18:54:19 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 18:54:19 +0000 |
commit | 9342a65993056c500a2bedc9195b55da3938a2f7 (patch) | |
tree | 253da6026d7a39740fc53a140932f27c0ded0e3a /sandbox/src/win_utils.cc | |
parent | 6a6a790f78f858263a1295e11671c850b1094538 (diff) | |
download | chromium_src-9342a65993056c500a2bedc9195b55da3938a2f7.zip chromium_src-9342a65993056c500a2bedc9195b55da3938a2f7.tar.gz chromium_src-9342a65993056c500a2bedc9195b55da3938a2f7.tar.bz2 |
Windows Sandbox: Perform case insensitive tests when checking
file handles to be returned to a sandboxed process.
BUG=67215
TEST=sbox_unittests
Review URL: http://codereview.chromium.org/5989004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69847 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src/win_utils.cc')
-rw-r--r-- | sandbox/src/win_utils.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sandbox/src/win_utils.cc b/sandbox/src/win_utils.cc index 85bf5f9..c1b4d2a 100644 --- a/sandbox/src/win_utils.cc +++ b/sandbox/src/win_utils.cc @@ -170,12 +170,11 @@ bool SameObject(HANDLE handle, const wchar_t* full_path) { return false; // Check up to the drive letter. - if (0 != actual_path.compare(0, vol_length, vol_name)) + if (0 != _wcsnicmp(actual_path.c_str(), vol_name, vol_length)) return false; // Check the path after the drive letter. - if (0 != actual_path.compare(vol_length, std::wstring::npos, - &path[colon_pos + 1])) + if (0 != _wcsicmp(&actual_path[vol_length], &path[colon_pos + 1])) return false; return true; |