MdeModulePkg/BrotliCustomDecompressLib: Correct BrotliDecompress

We need to pass DestSize as pointer, because we assign this output var
to TotalOut value inside BrotliDecompress routine

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
This commit is contained in:
Savva Mitrofanov 2022-12-23 19:09:27 +06:00 committed by Mikhail Krichanov
parent b97a76470a
commit 1a35fd886d
1 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ BrotliDecompress (
IN CONST VOID *Source, IN CONST VOID *Source,
IN UINTN SourceSize, IN UINTN SourceSize,
IN OUT VOID *Destination, IN OUT VOID *Destination,
IN OUT UINTN DestSize, IN OUT UINTN *DestSize,
IN VOID *BuffInfo IN VOID *BuffInfo
) )
{ {
@ -157,7 +157,7 @@ BrotliDecompress (
CopyMem (Temp, Output, (size_t)(NextOut - Output)); CopyMem (Temp, Output, (size_t)(NextOut - Output));
} }
DestSize = TotalOut; *DestSize = TotalOut;
BrFree (BuffInfo, Input); BrFree (BuffInfo, Input);
BrFree (BuffInfo, Output); BrFree (BuffInfo, Output);
@ -292,7 +292,7 @@ BrotliUefiDecompress (
(VOID *)((UINT8 *)Source + BROTLI_SCRATCH_MAX), (VOID *)((UINT8 *)Source + BROTLI_SCRATCH_MAX),
SourceSize - BROTLI_SCRATCH_MAX, SourceSize - BROTLI_SCRATCH_MAX,
Destination, Destination,
DestSize, &DestSize,
(VOID *)(&BroBuff) (VOID *)(&BroBuff)
); );