1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-24 06:45:31 +02:00

[package] uhttpd: fix bug in path canonization introduced by r20883

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20885 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2010-04-15 20:08:56 +00:00
parent cbe586a919
commit b092b4323d

View File

@ -420,8 +420,9 @@ static char * canonpath(const char *path, char *path_resolved)
}
/* 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 != '/') )
;