0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00

In ZLib::decompress_gzip(), allow max_size to be disabled

(i.e. no limit on size) by setting to zero.
This commit is contained in:
James Yonan 2015-10-15 23:31:21 -07:00
parent eaae86a144
commit 59c5950949

View File

@ -129,7 +129,7 @@ namespace openvpn {
OPENVPN_THROW(zlib_error, "zlib inflate failed, error=" << status);
b->set_size(avail - zs.s.avail_out);
blist.push_back(std::move(b));
if (zs.s.total_out > max_size)
if (max_size && zs.s.total_out > max_size)
OPENVPN_THROW(zlib_error, "zlib inflate max_size " << max_size << " exceeded");
hr = tr = 0;
} while (status == Z_OK);