aboutsummaryrefslogtreecommitdiffstats
path: root/package/uhttpd/src
diff options
context:
space:
mode:
Diffstat (limited to 'package/uhttpd/src')
-rw-r--r--package/uhttpd/src/uhttpd-utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/uhttpd/src/uhttpd-utils.c b/package/uhttpd/src/uhttpd-utils.c
index e65f2136d6..96c0b82cda 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 != '/') )
;