ignore system dictionary = "/" case. pointed @umq.
This commit is contained in:
parent
76a78ed351
commit
cb0b8b821d
1 changed files with 2 additions and 3 deletions
|
|
@ -91,11 +91,10 @@ make_full_path(char *path, int pathlen)
|
|||
return ERROR;
|
||||
|
||||
strlcpy(tmp, path, sizeof(tmp));
|
||||
index = strtok(tmp, "/");
|
||||
do {
|
||||
for (index = strtok(tmp, "/"); index != NULL; index = strtok(NULL, "/")) {
|
||||
if (!strcmp(index, ".."))
|
||||
return ERROR;
|
||||
} while ((index = strtok(NULL, "/")) != NULL );
|
||||
}
|
||||
|
||||
if (*path == '/') {
|
||||
if (strncmp(path, dict_dir, strlen(dict_dir)) == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue