diff options
author | Liming Gao <liming.gao@intel.com> | 2018-11-09 07:58:14 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-11-14 08:39:48 +0800 |
commit | b633c7357d30c0efc782eefdbc81b739aee5e427 (patch) | |
tree | d6d24d011cf086724632f40d78741f70071576c4 /BaseTools/Source/C/Common/Decompress.c | |
parent | c924df7ccf6df287035728b65d6f29283b517437 (diff) | |
download | edk2-b633c7357d30c0efc782eefdbc81b739aee5e427.tar.gz edk2-b633c7357d30c0efc782eefdbc81b739aee5e427.tar.bz2 edk2-b633c7357d30c0efc782eefdbc81b739aee5e427.zip |
BaseTools: Fix UEFI and Tiano Decompression logic issue
https://bugzilla.tianocore.org/show_bug.cgi?id=1317
This is a regression issue caused by 041d89bc0f0119df37a5fce1d0f16495ff905089.
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: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
(cherry picked from commit 5e45a1fdcfbf9b2b389122eb97475148594625f8)
Diffstat (limited to 'BaseTools/Source/C/Common/Decompress.c')
-rw-r--r-- | BaseTools/Source/C/Common/Decompress.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/BaseTools/Source/C/Common/Decompress.c b/BaseTools/Source/C/Common/Decompress.c index a87e806961..ed08545918 100644 --- a/BaseTools/Source/C/Common/Decompress.c +++ b/BaseTools/Source/C/Common/Decompress.c @@ -662,6 +662,12 @@ Returns: (VOID) BytesRemain--;
}
+ //
+ // Once mOutBuf is fully filled, directly return
+ //
+ if (Sd->mOutBuf >= Sd->mOrigSize) {
+ return ;
+ }
}
}
|