diff options
author | Liming Gao <liming.gao@intel.com> | 2018-11-09 07:58:16 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-11-11 11:48:37 +0800 |
commit | ade71c52a49d659b20c0b433fb11ddb4f4f543c4 (patch) | |
tree | f630f11cca9f95da4e5e8987bb7dd7bd00ea7f5b | |
parent | 1c4cecc9fd314de0dce8125b0d4b45967637a401 (diff) | |
download | edk2-ade71c52a49d659b20c0b433fb11ddb4f4f543c4.zip edk2-ade71c52a49d659b20c0b433fb11ddb4f4f543c4.tar.gz edk2-ade71c52a49d659b20c0b433fb11ddb4f4f543c4.tar.bz2 |
IntelFrameworkModulePkg: Fix UEFI and Tiano Decompression logic issue
https://bugzilla.tianocore.org/show_bug.cgi?id=1317
This is a regression issue caused by 684db6da64bc7b5faee4e1174e801c245f563b5c.
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>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
-rw-r--r-- | IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c index 39999a0..970795b 100644 --- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c +++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c @@ -634,6 +634,12 @@ Decode ( BytesRemain--;
}
+ //
+ // Once mOutBuf is fully filled, directly return
+ //
+ if (Sd->mOutBuf >= Sd->mOrigSize) {
+ goto Done ;
+ }
}
}
|