]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
zlib: Fix a bug when getting a gzip header extra field with inflate().
authorMark Adler <fork@madler.net>
Sat, 30 Jul 2022 22:51:11 +0000 (15:51 -0700)
committerEd Maste <emaste@FreeBSD.org>
Fri, 5 Aug 2022 02:30:20 +0000 (22:30 -0400)
commitdc3509f1aafcd966f3dd9226115cf94b691ff3c7
treedfe06b2a31577bf3e0d7b92e84b3d349b4b3585a
parentc0665d5c82407a41591532ac75bc37a13d3314e6
zlib: Fix a bug when getting a gzip header extra field with inflate().

If the extra field was larger than the space the user provided with
inflateGetHeader(), and if multiple calls of inflate() delivered
the extra header data, then there could be a buffer overflow of the
provided space. This commit assures that provided space is not
exceeded.

(cherry picked from zlib commit eff308af425b67093bab25f80f1ae950166bece1)
sys/contrib/zlib/inflate.c