aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-03-07 01:31:08 +0000
committerChristopher Faylor <me@cgf.cx>2002-03-07 01:31:08 +0000
commit9420d2b833b90df94e425b84b17b49735e1caa39 (patch)
treebee976e4bf6b5e40c72c504f90eda7a9d13ea15d
parent2a606041a1d6e841ebe7c3158e12bd6d6ad1b51e (diff)
downloadnewlib-9420d2b833b90df94e425b84b17b49735e1caa39.zip
newlib-9420d2b833b90df94e425b84b17b49735e1caa39.tar.gz
newlib-9420d2b833b90df94e425b84b17b49735e1caa39.tar.bz2
* path.cc (normalize_posix_path): Avoid runs of '.'s > 2.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/path.cc6
2 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index ef02345..a8e45ab 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2002-03-06 Christopher Faylor <cgf@redhat.com>
+
+ * path.cc (normalize_posix_path): Avoid runs of '.'s > 2.
+
2002-03-05 Christopher Faylor <cgf@redhat.com>
* errno.cc: Change EPERM associated text to "Operation not permitted"
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 0179820..e95f6ca 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -249,7 +249,11 @@ normalize_posix_path (const char *src, char *dst)
break;
}
else if (src[2] && !isslash (src[2]))
- break;
+ {
+ if (src[2] == '.')
+ return ENOENT;
+ break;
+ }
else
{
while (dst > dst_start && !isslash (*--dst))