summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_platform_file.cc
diff options
context:
space:
mode:
authorjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 22:36:01 +0000
committerjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 22:36:01 +0000
commit6f62e3b41fe9ef708aa8c990dd814ae91d68f2f4 (patch)
tree3790ad329f7427f262416f5e6bca894d158e29b1 /ipc/ipc_platform_file.cc
parentffd5a69e93a004ccc91d0138a42f9415b0a7caa7 (diff)
downloadchromium_src-6f62e3b41fe9ef708aa8c990dd814ae91d68f2f4.zip
chromium_src-6f62e3b41fe9ef708aa8c990dd814ae91d68f2f4.tar.gz
chromium_src-6f62e3b41fe9ef708aa8c990dd814ae91d68f2f4.tar.bz2
GetFileHandleForProcess should check for INVALID_HANDLE_VALUE
BUG=243339 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/16020004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202207 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_platform_file.cc')
-rw-r--r--ipc/ipc_platform_file.cc3
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,