summaryrefslogtreecommitdiff
path: root/src/http/ngx_http_parse.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-09-14 13:07:23 +0000
committerJonathan Kolb <jon@b0g.us>2009-09-14 13:07:23 +0000
commit07651bee2c67cb8fe4a8d5e40880ac05b6db6dc2 (patch)
treec7dee2ce52cf9515e94846843c60822dcdd2de18 /src/http/ngx_http_parse.c
parent7b3d98fb1cf253877bc0deeafecd1feeb2b8fd22 (diff)
downloadnginx-07651bee2c67cb8fe4a8d5e40880ac05b6db6dc2.tar.gz
Changes with nginx 0.8.15 14 Sep 2009v0.8.15
*) Security: a segmentation fault might occur in worker process while specially crafted request handling. Thanks to Chris Ries. *) Bugfix: if names .domain.tld, .sub.domain.tld, and .domain-some.tld were defined, then the name .sub.domain.tld was matched by .domain.tld. *) Bugfix: in transparency support in the ngx_http_image_filter_module. *) Bugfix: in file AIO. *) Bugfix: in X-Accel-Redirect usage; the bug had appeared in 0.8.11. *) Bugfix: in embedded perl module; the bug had appeared in 0.8.11.
Diffstat (limited to 'src/http/ngx_http_parse.c')
-rw-r--r--src/http/ngx_http_parse.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
index 9865564e5..d2abaa708 100644
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -1134,11 +1134,15 @@ ngx_http_parse_complex_uri(ngx_http_request_t *r, ngx_uint_t merge_slashes)
#endif
case '/':
state = sw_slash;
- u -= 4;
- if (u < r->uri.data) {
- return NGX_HTTP_PARSE_INVALID_REQUEST;
- }
- while (*(u - 1) != '/') {
+ u -= 5;
+ for ( ;; ) {
+ if (u < r->uri.data) {
+ return NGX_HTTP_PARSE_INVALID_REQUEST;
+ }
+ if (*u == '/') {
+ u++;
+ break;
+ }
u--;
}
break;