mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:57:45 +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:
parent
c4d3723087
commit
8d419c1915
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue