Skip to content

Commit

Permalink
Upstream: fixed request chain traversal (ticket #1618).
Browse files Browse the repository at this point in the history
The problem does not manifest itself currently, because in case of
non-buffered reading, chain link created by u->create_request method
consists of a single element.

Found by PVS-Studio.
  • Loading branch information
vlhomutov committed Aug 24, 2018
1 parent d817cea commit 62821f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/http/ngx_http_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -2135,7 +2135,7 @@ ngx_http_upstream_send_request_body(ngx_http_request_t *r,
out = u->request_bufs;

if (r->request_body->bufs) {
for (cl = out; cl->next; cl = out->next) { /* void */ }
for (cl = out; cl->next; cl = cl->next) { /* void */ }
cl->next = r->request_body->bufs;
r->request_body->bufs = NULL;
}
Expand Down

0 comments on commit 62821f1

Please sign in to comment.