diff --git a/BaseTools/Source/C/TianoCompress/TianoCompress.c b/BaseTools/Source/C/TianoCompress/TianoCompress.c index b994d933eb..93cb6c3ac3 100644 --- a/BaseTools/Source/C/TianoCompress/TianoCompress.c +++ b/BaseTools/Source/C/TianoCompress/TianoCompress.c @@ -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) {