From 38f536e0040bb4973694ab917cd4143bfbfc5d9e Mon Sep 17 00:00:00 2001 From: "nsylvain@chromium.org" Date: Thu, 16 Sep 2010 21:24:22 +0000 Subject: 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 --- sandbox/src/win_utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sandbox') 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(wcslen(vol_name)); // The two paths should be the same length. if (vol_length + path.size() - (colon_pos + 1) != actual_path.size()) -- cgit v1.1