diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2012-02-13 15:33:08 +0000 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-02-13 15:33:08 +0000 |
commit | 1b0ad6ee72179fef479bfae7c8c4bfd5ac834c29 (patch) | |
tree | 41be3508441cf82c71a4a928c025def21786504f /src/http/ngx_http_request.c | |
parent | 947fc03ca30e355fd562404f7e0b3ff0ec232c66 (diff) | |
download | nginx-1b0ad6ee72179fef479bfae7c8c4bfd5ac834c29.tar.gz nginx-1b0ad6ee72179fef479bfae7c8c4bfd5ac834c29.zip |
Core: protection from subrequest loops.
Without the protection, subrequest loop results in r->count overflow and
SIGSEGV. Protection was broken in 0.7.25.
Note that this also limits number of parallel subrequests. This
wasn't exactly the case before 0.7.25 as local subrequests were
completed directly.
See here for details:
http://nginx.org/pipermail/nginx-ru/2010-February/032184.html
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 2b3f0065b..c35d550a2 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2010,6 +2010,7 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc) if (r == c->data) { r->main->count--; + r->main->subrequests++; if (!r->logged) { |