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>2005-05-13 17:23:38 +0400
committerChristopher Faylor <me@cgf.cx>2005-05-13 17:23:38 +0400
commiteb6cd95fecef02c261ef266161f8dff6924efa4d (patch)
tree244c9f7f903af2f6872433d6a88b81182aad0796 /winsup/cygwin/fhandler_netdrive.cc
parent66582dd6e7e63a2c179357e61fe2ccd53c83b02b (diff)
* fhandler_netdrive.cc (fhandler_netdrive::exists): Assert that "//" exists.
Diffstat (limited to 'winsup/cygwin/fhandler_netdrive.cc')
-rw-r--r--winsup/cygwin/fhandler_netdrive.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_netdrive.cc b/winsup/cygwin/fhandler_netdrive.cc
index 0567a2fc3..0b6aba7d3 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';