diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2019-07-31 17:29:00 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2019-07-31 17:29:00 +0300 |
commit | 39c40428f93db246a9a27e7a109413fae46e195d (patch) | |
tree | bd2cdf0910e1eb262cbb6afe5aef1712ad1036f6 /src/mail/ngx_mail_smtp_handler.c | |
parent | 6179b98ed537e2ad39eff11ee1689bf4700e59af (diff) | |
download | nginx-39c40428f93db246a9a27e7a109413fae46e195d.tar.gz nginx-39c40428f93db246a9a27e7a109413fae46e195d.zip |
Gzip: fixed "zero size buf" alerts after ac5a741d39cf.
After ac5a741d39cf it is now possible that after zstream.avail_out
reaches 0 and we allocate additional buffer, there will be no more data
to put into this buffer, triggering "zero size buf" alert. Fix is to
reset b->temporary flag in this case.
Additionally, an optimization added to avoid allocating additional buffer
in this case, by checking if last deflate() call returned Z_STREAM_END.
Note that checking for Z_STREAM_END by itself is not enough to fix alerts,
as deflate() can return Z_STREAM_END without producing any output if the
buffer is smaller than gzip trailer.
Reported by Witold Filipczyk,
http://mailman.nginx.org/pipermail/nginx-devel/2019-July/012469.html.
Diffstat (limited to 'src/mail/ngx_mail_smtp_handler.c')
0 files changed, 0 insertions, 0 deletions