Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2.c @ 6587:d45845a6c96a
HTTP/2: fixed a segfault while processing unbuffered upload.
The ngx_http_v2_finalize_connection() closes current stream, but that is an
invalid operation while processing unbuffered upload. This results in access
to already freed memory, since the upstream module sets a cleanup handler that
also finalizes the request.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Thu, 16 Jun 2016 20:55:11 +0300 |
parents | bc6fd7afeed6 |
children | dc5eaf998b96 |
comparison
equal
deleted
inserted
replaced
6586:1064ea81ed3a | 6587:d45845a6c96a |
---|---|
4167 (void) ngx_http_v2_send_output_queue(h2c); | 4167 (void) ngx_http_v2_send_output_queue(h2c); |
4168 } | 4168 } |
4169 | 4169 |
4170 c->error = 1; | 4170 c->error = 1; |
4171 | 4171 |
4172 if (h2c->state.stream) { | |
4173 ngx_http_v2_close_stream(h2c->state.stream, NGX_HTTP_BAD_REQUEST); | |
4174 } | |
4175 | |
4176 if (!h2c->processing) { | 4172 if (!h2c->processing) { |
4177 ngx_http_close_connection(c); | 4173 ngx_http_close_connection(c); |
4178 return; | 4174 return; |
4179 } | 4175 } |
4180 | 4176 |