LibCore: Trim decompressed Gzip output to size

Prior to this commit, we would (re-)allocate the output buffer aligned
to 1024 bytes, but never trim it down to size, which caused
Gzip::decompress to return uninitialised data.
This commit is contained in:
AnotherTest 2020-04-28 00:50:00 +04:30 committed by Andreas Kling
parent c4d3723087
commit 8d419c1915
Notes: sideshowbarker 2024-07-19 07:14:45 +09:00

View file

@ -136,6 +136,7 @@ Optional<ByteBuffer> Gzip::decompress(const ByteBuffer& data)
if (puff_ret == 0) {
dbg() << "Gzip::decompress: Decompression success.";
destination.trim(destination_len);
break;
}