]> git.kaiwu.me - nginx.git/commit
Negative size buffers detection.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 26 Nov 2018 15:29:56 +0000 (18:29 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 26 Nov 2018 15:29:56 +0000 (18:29 +0300)
commitf4c70589ce2875b67554113dc7fe6efc581444d6
treec31ce7704b5daac2365c132ce6ea1372e8a355cb
parentf5708e66c7187c2489a7d0b39918f6d0fe4c6645
Negative size buffers detection.

In the past, there were several security issues which resulted in
worker process memory disclosure due to buffers with negative size.
It looks reasonable to check for such buffers in various places,
much like we already check for zero size buffers.

While here, removed "#if 1 / #endif" around zero size buffer checks.
It looks highly unlikely that we'll disable these checks anytime soon.
src/core/ngx_output_chain.c
src/http/ngx_http_write_filter_module.c
src/stream/ngx_stream_write_filter_module.c