From a12f7611f4bc6937a222122c8e9f0a8792b86c00 Mon Sep 17 00:00:00 2001 From: jow Date: Thu, 15 Apr 2010 20:09:34 +0000 Subject: [PATCH] [backfire] merge r20885 git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@20886 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/uhttpd/src/uhttpd-utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/uhttpd/src/uhttpd-utils.c b/package/uhttpd/src/uhttpd-utils.c index e65f2136d..96c0b82cd 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 != '/') ) ;