diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-16 21:24:22 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-16 21:24:22 +0000 |
commit | 38f536e0040bb4973694ab917cd4143bfbfc5d9e (patch) | |
tree | a670dac96d8ce484ceb00a3e20c6f9f1dcd13a33 /sandbox | |
parent | d8da17e4948221915f8b8e41e3efa50a6456f960 (diff) | |
download | chromium_src-38f536e0040bb4973694ab917cd4143bfbfc5d9e.zip chromium_src-38f536e0040bb4973694ab917cd4143bfbfc5d9e.tar.gz chromium_src-38f536e0040bb4973694ab917cd4143bfbfc5d9e.tar.bz2 |
Fix SameObject to not return false when the volume name returned by QueryDosDevice ends with
more than 2 NULL chars.
Review URL: http://codereview.chromium.org/3429010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59719 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/src/win_utils.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sandbox/src/win_utils.cc b/sandbox/src/win_utils.cc index 7a95b32..85bf5f9 100644 --- a/sandbox/src/win_utils.cc +++ b/sandbox/src/win_utils.cc @@ -163,7 +163,7 @@ bool SameObject(HANDLE handle, const wchar_t* full_path) { return false; // Ignore the nulls at the end. - vol_length -= 2; + vol_length = static_cast<DWORD>(wcslen(vol_name)); // The two paths should be the same length. if (vol_length + path.size() - (colon_pos + 1) != actual_path.size()) |