From fe5ba952458a91f04a732302595d229a14fd4a88 Mon Sep 17 00:00:00 2001 From: Pierre Humblet Date: Fri, 1 Nov 2002 01:47:29 +0000 Subject: [PATCH] 2002-10-31 Pierre Humblet * fhandler.cc (fhandler_base::open): Verify pc isn't NULL. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/fhandler.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b0cb4b934..ebc3951a6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2002-10-31 Pierre Humblet + + * fhandler.cc (fhandler_base::open): Verify pc isn't NULL. + 2002-10-30 Christopher Faylor * include/cygwin/version.h: Bump DLL minor number. diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index fccbb361e..ffb67b6cc 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -442,7 +442,7 @@ fhandler_base::open (path_conv *pc, int flags, mode_t mode) if (x == INVALID_HANDLE_VALUE) { - if (pc->isdir () && !wincap.can_open_directories ()) + if (!wincap.can_open_directories () && pc && pc->isdir ()) { if (mode & (O_CREAT | O_EXCL) == (O_CREAT | O_EXCL)) set_errno (EEXIST);