Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-12-17 22:55:58 +0300
committerChristopher Faylor <me@cgf.cx>2001-12-17 22:55:58 +0300
commit513a848fe6a042dbf7420a794194eaba8292689b (patch)
tree51d71082abe25d89e03e40d35073b9c31db09023 /winsup/cygwin/dtable.cc
parent7b96e69ac5f81a43e08cfaefeeb7d78cd0874b66 (diff)
* dtable.cc (dtable::init_std_file_from_handle): Avoid initializing using an
invalid handle.
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 664b2c92d..a6f5b075c 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -196,6 +196,9 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle, DWORD myaccess)
first_fd_for_open = 0;
+ if (!handle || handle == INVALID_HANDLE_VALUE)
+ return;
+
if (__fmode)
bin = __fmode;
else