From 4fc976cc48072b0efc286ac93f95d1be96c4c170 Mon Sep 17 00:00:00 2001 From: Savva Mitrofanov Date: Fri, 23 Dec 2022 19:09:27 +0600 Subject: [PATCH] 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 --- .../Library/BrotliCustomDecompressLib/BrotliDecompress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Library/BrotliCustomDecompressLib/BrotliDecompress.c b/MdeModulePkg/Library/BrotliCustomDecompressLib/BrotliDecompress.c index 3cb31ab984..73c8c1f23d 100644 --- a/MdeModulePkg/Library/BrotliCustomDecompressLib/BrotliDecompress.c +++ b/MdeModulePkg/Library/BrotliCustomDecompressLib/BrotliDecompress.c @@ -82,7 +82,7 @@ BrotliDecompress ( IN CONST VOID *Source, IN UINTN SourceSize, IN OUT VOID *Destination, - IN OUT UINTN DestSize, + IN OUT UINTN *DestSize, IN VOID *BuffInfo ) { @@ -157,7 +157,7 @@ BrotliDecompress ( CopyMem (Temp, Output, (size_t)(NextOut - Output)); } - DestSize = TotalOut; + *DestSize = TotalOut; BrFree (BuffInfo, Input); BrFree (BuffInfo, Output); @@ -292,7 +292,7 @@ BrotliUefiDecompress ( (VOID *)((UINT8 *)Source + BROTLI_SCRATCH_MAX), SourceSize - BROTLI_SCRATCH_MAX, Destination, - DestSize, + &DestSize, (VOID *)(&BroBuff) );