projects
/
openwrt
/
svn-archive
/
archive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[package] uhttpd: fix bug in path canonization introduced by r20883
[openwrt/svn-archive/archive.git]
/
package
/
uhttpd
/
src
/
uhttpd-utils.c
diff --git
a/package/uhttpd/src/uhttpd-utils.c
b/package/uhttpd/src/uhttpd-utils.c
index e65f2136d64fce7b8518087eb4295e2bf22b2f3a..96c0b82cda5d3c79e0a419cd67579caccebbf0fa 100644
(file)
--- 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 != '/') )
;