The official NGINX Open Source repository.
Go to file
Maxim Dounin a3d382397a Core: skip special buffers on writing (ticket #981).
A special last buffer with cl->buf->pos set to NULL can be present in
a chain when writing request body if chunked encoding was used.  This
resulted in a NULL pointer dereference if it happened to be the only
buffer left after a do...while loop iteration in ngx_write_chain_to_file().

The problem originally appeared in nginx 1.3.9 with chunked encoding
support.  Additionally, rev. 3832b608dc8d (nginx 1.9.13) changed the
minimum number of buffers to trigger this from IOV_MAX (typically 1024)
to NGX_IOVS_PREALLOCATE (typically 64).

Fix is to skip such buffers in ngx_chain_to_iovec(), much like it is
done in other places.
2016-05-31 05:13:30 +03:00
auto Upstream: the "transparent" parameter of proxy_bind and friends. 2015-12-18 19:05:27 +03:00
conf Added the REQUEST_SCHEME parameter. 2015-06-05 22:23:26 +03:00
contrib Fixed spelling. 2016-04-07 11:50:13 +03:00
docs Trailing spaces removed. 2016-05-30 18:09:41 +03:00
misc Updated OpenSSL used for win32 builds. 2016-05-24 17:44:01 +03:00
src Core: skip special buffers on writing (ticket #981). 2016-05-31 05:13:30 +03:00
.hgtags release-1.11.0 tag 2016-05-24 18:54:42 +03:00