diff options
author | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-28 18:43:36 +0000 |
---|---|---|
committer | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-28 18:43:36 +0000 |
commit | 03502039a9c7279dd23e102bfef44738be2247ff (patch) | |
tree | d4b92b864e90b836336e852ba8acb51c652ed51a | |
parent | 63dc8f0493494b9f73efcae0819cbfa4d2ce0ebc (diff) | |
download | chromium_src-03502039a9c7279dd23e102bfef44738be2247ff.zip chromium_src-03502039a9c7279dd23e102bfef44738be2247ff.tar.gz chromium_src-03502039a9c7279dd23e102bfef44738be2247ff.tar.bz2 |
Merge 202207 "GetFileHandleForProcess should check for INVALID_H..."
> GetFileHandleForProcess should check for INVALID_HANDLE_VALUE
>
> BUG=243339
> R=tsepez@chromium.org
>
> Review URL: https://codereview.chromium.org/16020004
TBR=jschuh@chromium.org
Review URL: https://codereview.chromium.org/15742023
git-svn-id: svn://svn.chromium.org/chrome/branches/1453/src@202611 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ipc/ipc_platform_file.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ipc/ipc_platform_file.cc b/ipc/ipc_platform_file.cc index 6aad89b..4a756ea 100644 --- a/ipc/ipc_platform_file.cc +++ b/ipc/ipc_platform_file.cc @@ -18,7 +18,8 @@ PlatformFileForTransit GetFileHandleForProcess(base::PlatformFile handle, DWORD options = DUPLICATE_SAME_ACCESS; if (close_source_handle) options |= DUPLICATE_CLOSE_SOURCE; - if (!::DuplicateHandle(::GetCurrentProcess(), + if (handle == INVALID_HANDLE_VALUE || + !::DuplicateHandle(::GetCurrentProcess(), handle, process, &out_handle, |