aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_netdrive.cc5
2 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index ed9d167..0aff5fc 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-13 Christopher Faylor <cgf@timesys.com>
+
+ * fhandler_netdrive.cc (fhandler_netdrive::exists): Assert that "//"
+ exists.
+
2005-05-12 Christopher Faylor <cgf@timesys.com>
* cygtls.cc (_cygtls::remove): Eliminate compiler warning.
diff --git a/winsup/cygwin/fhandler_netdrive.cc b/winsup/cygwin/fhandler_netdrive.cc
index 0567a2f..0b6aba7 100644
--- a/winsup/cygwin/fhandler_netdrive.cc
+++ b/winsup/cygwin/fhandler_netdrive.cc
@@ -29,7 +29,10 @@ fhandler_netdrive::exists ()
{
char *to;
const char *from;
- char namebuf[strlen (get_name ()) + 1];
+ size_t len = strlen (get_name ());
+ if (len == 2)
+ return 1;
+ char namebuf[len + 1];
for (to = namebuf, from = get_name (); *from; to++, from++)
*to = (*from == '/') ? '\\' : *from;
*to = '\0';