* 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:
parent
89256ff149
commit
504678827a
|
@ -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>
|
2003-10-25 Brian Ford <ford@vss.fsi.com>
|
||||||
|
|
||||||
* fhandler.cc (fhandler_base::ioctl): Handle FIONBIO.
|
* fhandler.cc (fhandler_base::ioctl): Handle FIONBIO.
|
||||||
|
|
|
@ -282,7 +282,14 @@ normalize_posix_path (const char *src, char *dst)
|
||||||
else if (src[2] && !isslash (src[2]))
|
else if (src[2] && !isslash (src[2]))
|
||||||
{
|
{
|
||||||
if (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;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue