diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-04-15 20:08:56 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-04-15 20:08:56 +0000 |
commit | 14428874ae15939acd7b7b34d4d78cb1ff88f81b (patch) | |
tree | d7808041e56206c227f144c7b7a6be2f115417ad | |
parent | 20ef055c2f698618142a280d5cbc010acacfd651 (diff) | |
download | mtk-20170518-14428874ae15939acd7b7b34d4d78cb1ff88f81b.zip mtk-20170518-14428874ae15939acd7b7b34d4d78cb1ff88f81b.tar.gz mtk-20170518-14428874ae15939acd7b7b34d4d78cb1ff88f81b.tar.bz2 |
uhttpd: fix bug in path canonization introduced by r20883
SVN-Revision: 20885
-rw-r--r-- | package/uhttpd/src/uhttpd-utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/package/uhttpd/src/uhttpd-utils.c b/package/uhttpd/src/uhttpd-utils.c index e65f213..96c0b82 100644 --- a/package/uhttpd/src/uhttpd-utils.c +++ b/package/uhttpd/src/uhttpd-utils.c @@ -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 != '/') ) ; |