projects
/
chise
/
xemacs-chise.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Apply new glyph-image conventions for `cns11643-7'.
[chise/xemacs-chise.git-]
/
src
/
realpath.c
diff --git
a/src/realpath.c
b/src/realpath.c
index
da05446
..
442c3ff
100644
(file)
--- a/
src/realpath.c
+++ b/
src/realpath.c
@@
-90,11
+90,18
@@
win32_readlink (const char * name, char * buf, int size)
assert (*name);
/* Sort of check we have a valid filename. */
assert (*name);
/* Sort of check we have a valid filename. */
- if (strpbrk (name, "*?|<>\"") || strlen (name) >= MAX_PATH)
+ /* #### can we have escaped shell operators in a Windows filename? */
+ if (strpbrk (name, "|<>\"") || strlen (name) >= MAX_PATH)
{
errno = EIO;
return -1;
}
{
errno = EIO;
return -1;
}
+ /* #### can we have escaped wildcards in a Windows filename? */
+ else if (strpbrk (name, "*?"))
+ {
+ errno = EINVAL; /* this valid path can't be a symlink */
+ return -1;
+ }
/* Find start of filename */
lastname = name + strlen (name);
/* Find start of filename */
lastname = name + strlen (name);