Potential Bug When First Character In Path Is Unicode (#398)
Fix is_absolute_path() to ignore non-ASCII values.
This commit is contained in:
parent
8cf6003bac
commit
25588ffb7a
|
@ -1391,7 +1391,7 @@ is_absolute_path(const char *path)
|
|||
if(*path == '\"' || *path == '\'') /* skip double quote if path is "c:\abc" */
|
||||
path++;
|
||||
|
||||
if (*path == '/' || *path == '\\' || (*path != '\0' && isalpha(*path) && path[1] == ':') ||
|
||||
if (*path == '/' || *path == '\\' || (*path != '\0' && __isascii(*path) && isalpha(*path) && path[1] == ':') ||
|
||||
((strlen(path) >= strlen(PROGRAM_DATA)) && (memcmp(path, PROGRAM_DATA, strlen(PROGRAM_DATA)) == 0)))
|
||||
retVal = 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue