mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +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
Notes:
sideshowbarker
2024-07-19 07:14:45 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/8d419c1915c Pull-request: https://github.com/SerenityOS/serenity/pull/1990
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
Reference in a new issue