HANDLE dir_handle;
int len = 0;
+ /* must be valid filename, no wild cards or other illegal characters */
+ if (strpbrk (name, "*?|<>\""))
+ return 0;
+
dir_handle = FindFirstFile (name, &find_data);
if (dir_handle != INVALID_HANDLE_VALUE)
{
}
name = (char *) map_w32_filename (path, &path);
- /* must be valid filename, no wild cards */
- if (strchr (name, '*') || strchr (name, '?'))
+ /* must be valid filename, no wild cards or other illegal characters */
+ if (strpbrk (name, "*?|<>\""))
{
errno = ENOENT;
return -1;