mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-05 15:27:04 +00:00
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:
committed by
Andreas Kling
parent
c4d3723087
commit
8d419c1915
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user