Debian Codegraph @

debian/patches/fix_symlink_to_root_dotdot

raw
1 Index: symlinks/symlinks.c
2 ===================================================================
3 --- symlinks.orig/symlinks.c
4 +++ symlinks/symlinks.c
5 @@ -90,7 +90,7 @@ static int tidy_path (char *path)
6
7 while ((p = strstr(path,"/../")) != NULL) {
8 s = p+3;
9 - for (p--; p != path; p--) if (*p == '/') break;
10 + for (p--; p > path; p--) if (*p == '/') break;
11 if (*p != '/')
12 break;
13 while ((*p++ = *s++));