summaryrefslogtreecommitdiffstats
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-11-09 07:58:16 +0800
committerLiming Gao <liming.gao@intel.com>2018-11-11 11:48:37 +0800
commitade71c52a49d659b20c0b433fb11ddb4f4f543c4 (patch)
treef630f11cca9f95da4e5e8987bb7dd7bd00ea7f5b /IntelFrameworkModulePkg
parent1c4cecc9fd314de0dce8125b0d4b45967637a401 (diff)
downloadedk2-ade71c52a49d659b20c0b433fb11ddb4f4f543c4.tar.gz
edk2-ade71c52a49d659b20c0b433fb11ddb4f4f543c4.tar.bz2
edk2-ade71c52a49d659b20c0b433fb11ddb4f4f543c4.zip
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>
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
index 39999a07c3..970795b1da 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 ;
+ }
}
}