* path.cc (normalize_posix_path): Test runs of more than two

dots for being a run of only dots.  Let it pass if not.
This commit is contained in:
Corinna Vinschen 2003-10-25 16:12:45 +00:00
parent 89256ff149
commit 504678827a
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-10-25 Corinna Vinschen <corinna@vinschen.de>
* path.cc (normalize_posix_path): Test runs of more than two
dots for being a run of only dots. Let it pass if not.
2003-10-25 Brian Ford <ford@vss.fsi.com>
* fhandler.cc (fhandler_base::ioctl): Handle FIONBIO.

View File

@ -282,7 +282,14 @@ normalize_posix_path (const char *src, char *dst)
else if (src[2] && !isslash (src[2]))
{
if (src[2] == '.')
return ENOENT;
{
/* Is this a run of dots? That would be an invalid
filename. A bunch of leading dots would be ok,
though. */
int n = strspn (src, ".");
if (!src[n] || isslash (src[n])) /* just dots... */
return ENOENT;
}
break;
}
else