diff options
author | Liming Gao <liming.gao@intel.com> | 2018-11-09 07:58:15 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-11-11 11:48:34 +0800 |
commit | 1c4cecc9fd314de0dce8125b0d4b45967637a401 (patch) | |
tree | 26028a20d153f1bddfc9b79a69b0f2a6477b79f1 /MdePkg/Library/BaseUefiDecompressLib | |
parent | 5e45a1fdcfbf9b2b389122eb97475148594625f8 (diff) | |
download | edk2-1c4cecc9fd314de0dce8125b0d4b45967637a401.tar.gz edk2-1c4cecc9fd314de0dce8125b0d4b45967637a401.tar.bz2 edk2-1c4cecc9fd314de0dce8125b0d4b45967637a401.zip |
MdePkg BaseUefiDecompressLib: Fix UEFI Decompression logic issue
https://bugzilla.tianocore.org/show_bug.cgi?id=1317
This is a regression issue caused by 2ec7953d49677142c5f7552e9e3d96fb406ba0c4.
In Decode() function, once mOutBuf is fully filled, Decode() should return.
Current logic misses the checker of mOutBuf after while() loop.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'MdePkg/Library/BaseUefiDecompressLib')
-rw-r--r-- | MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c index 9fc637e058..c1e8c5581a 100644 --- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c @@ -641,6 +641,12 @@ Decode ( BytesRemain--;
}
+ //
+ // Once mOutBuf is fully filled, directly return
+ //
+ if (Sd->mOutBuf >= Sd->mOrigSize) {
+ goto Done;
+ }
}
}
|