diff options
author | Christopher Faylor <me@cgf.cx> | 2005-05-13 13:23:38 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-05-13 13:23:38 +0000 |
commit | eb6cd95fecef02c261ef266161f8dff6924efa4d (patch) | |
tree | 244c9f7f903af2f6872433d6a88b81182aad0796 /winsup | |
parent | 66582dd6e7e63a2c179357e61fe2ccd53c83b02b (diff) | |
download | newlib-eb6cd95fecef02c261ef266161f8dff6924efa4d.zip newlib-eb6cd95fecef02c261ef266161f8dff6924efa4d.tar.gz newlib-eb6cd95fecef02c261ef266161f8dff6924efa4d.tar.bz2 |
* fhandler_netdrive.cc (fhandler_netdrive::exists): Assert that "//" exists.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_netdrive.cc | 5 |
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'; |