[package] uhttpd: fix bug in path canonization introduced by r20883
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20885 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
3fe0660216
commit
7119535b12
|
@ -420,8 +420,9 @@ static char * canonpath(const char *path, char *path_resolved)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* collapse /x/../ */
|
/* collapse /x/../ */
|
||||||
else if( path_cpy[2] == '.' )
|
else if( (path_cpy[2] == '.') &&
|
||||||
{
|
((path_cpy[3] == '/') || (path_cpy[3] == '\0'))
|
||||||
|
) {
|
||||||
while( (path_res > path_resolved) && (*--path_res != '/') )
|
while( (path_res > path_resolved) && (*--path_res != '/') )
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue