Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ BrFree (
@param Source The source buffer containing the compressed data.
@param SourceSize The size of source buffer.
@param Destination The destination buffer to store the decompressed data.
@param DestSize The destination buffer size.
@param BuffInfo The pointer to the BROTLI_BUFF instance.

@retval EFI_SUCCESS Decompression completed successfully, and
Expand All @@ -77,12 +76,12 @@ BrFree (
The source buffer specified by Source is corrupted
(not in a valid compressed format).
**/
STATIC
EFI_STATUS
BrotliDecompress (
BrotliDecompressInternal (
IN CONST VOID *Source,
IN UINTN SourceSize,
IN OUT VOID *Destination,
IN OUT UINTN DestSize,
IN VOID *BuffInfo
)
{
Expand Down Expand Up @@ -157,8 +156,6 @@ BrotliDecompress (
CopyMem (Temp, Output, (size_t)(NextOut - Output));
}

DestSize = TotalOut;

BrFree (BuffInfo, Input);
BrFree (BuffInfo, Output);
BrotliDecoderDestroyInstance (BroState);
Expand Down Expand Up @@ -276,7 +273,6 @@ BrotliUefiDecompress (
IN OUT VOID *Scratch
)
{
UINTN DestSize = 0;
EFI_STATUS Status;
BROTLI_BUFF BroBuff;
UINT64 GetSize;
Expand All @@ -288,11 +284,10 @@ BrotliUefiDecompress (
BroBuff.Buff = Scratch;
BroBuff.BuffSize = (UINTN)GetSize;

Status = BrotliDecompress (
Status = BrotliDecompressInternal (
(VOID *)((UINT8 *)Source + BROTLI_SCRATCH_MAX),
SourceSize - BROTLI_SCRATCH_MAX,
Destination,
DestSize,
(VOID *)(&BroBuff)
);

Expand Down
Loading