mirror of https://github.com/acidanthera/audk.git
BaseTools/TianoCompress: Add checks for array access
Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
b3520abde8
commit
5acc8d3cdd
|
@ -2215,7 +2215,7 @@ Returns:
|
|||
for (Char = 0; Char < NumOfChar; Char++) {
|
||||
|
||||
Len = BitLen[Char];
|
||||
if (Len == 0) {
|
||||
if (Len == 0 || Len >= 17) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2346,6 +2346,8 @@ Returns:
|
|||
volatile UINT16 Index;
|
||||
UINT32 Mask;
|
||||
|
||||
assert (nn <= NPT);
|
||||
|
||||
Number = (UINT16) GetBits (Sd, nbit);
|
||||
|
||||
if (Number == 0) {
|
||||
|
|
Loading…
Reference in New Issue