diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-12-15 10:24:57 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2006-12-15 10:24:57 +0000 |
commit | 03011fa512bc04879f17774450712dade3dc77b9 (patch) | |
tree | d512e27f0288cf3f1faa470f7e053dfaec5534ae /src/http/ngx_http_request.c | |
parent | c996d3250d2bb7758afd3601b080bf7d04744e3f (diff) | |
download | nginx-03011fa512bc04879f17774450712dade3dc77b9.tar.gz nginx-03011fa512bc04879f17774450712dade3dc77b9.zip |
fix segfault when $host is used and
*) request is "GET http://host" without CR or LF, or timed out
*) request is "GET http://host" with a large blank space
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 2c1ac9566..f6dcd6a56 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1104,7 +1104,9 @@ ngx_http_alloc_large_header_buffer(ngx_http_request_t *r, if (r->host_start) { r->host_start = new + (r->host_start - old); - r->host_end = new + (r->host_end - old); + if (r->host_end) { + r->host_end = new + (r->host_end - old); + } } if (r->port_start) { |