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;
|
return ERROR;
|
||||||
|
|
||||||
strlcpy(tmp, path, sizeof(tmp));
|
strlcpy(tmp, path, sizeof(tmp));
|
||||||
index = strtok(tmp, "/");
|
for (index = strtok(tmp, "/"); index != NULL; index = strtok(NULL, "/")) {
|
||||||
do {
|
|
||||||
if (!strcmp(index, ".."))
|
if (!strcmp(index, ".."))
|
||||||
return ERROR;
|
return ERROR;
|
||||||
} while ((index = strtok(NULL, "/")) != NULL );
|
}
|
||||||
|
|
||||||
if (*path == '/') {
|
if (*path == '/') {
|
||||||
if (strncmp(path, dict_dir, strlen(dict_dir)) == 0) {
|
if (strncmp(path, dict_dir, strlen(dict_dir)) == 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue