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
parent7b96e69ac5f81a43e08cfaefeeb7d78cd0874b66 (diff)
* dtable.cc (dtable::init_std_file_from_handle): Avoid initializing using an
invalid handle.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/dtable.cc3
2 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f21a3b366..dccce15bf 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-17 Christopher Faylor <cgf@redhat.com>
+
+ * dtable.cc (dtable::init_std_file_from_handle): Avoid initializing
+ using an invalid handle.
+
2001-12-16 David Billinghurst <David.Billinghurst@riotinto.com>
* include/limits.h: Define LLONG_MIN, LLONG_MAX, ULLONG_MAX.
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