summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index d40b40f54..4e0b3d802 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -559,7 +559,7 @@ path_conv::check (const char *src, unsigned opt,
not by native NT functions. */
while (tail[-1] == '.' || tail[-1] == ' ')
tail--;
- if (isslash (tail[-1]))
+ if (tail > path_copy + 1 && isslash (tail[-1]))
{
error = ENOENT;
return;