ignore system dictionary = "/" case. pointed @umq.

This commit is contained in:
iratqq 2008-02-08 12:04:00 +00:00
commit cb0b8b821d

View file

@ -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) {