summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c')
-rw-r--r--IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
index 6a0e5eca45..fb60d029a8 100644
--- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
+++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
@@ -108,6 +108,7 @@ GetBits (
Creates Huffman Code mapping table for Extra Set, Char&Len Set
and Position Set according to code length array.
+ If TableBits > 16, then ASSERT ().
@param Sd The global scratch data
@param NumOfChar Number of symbols in the symbol set
@@ -143,6 +144,12 @@ MakeTable (
UINT16 WordOfStart;
UINT16 WordOfCount;
+ //
+ // The maximum mapping table width supported by this internal
+ // working function is 16.
+ //
+ ASSERT (TableBits <= 16);
+
for (Index = 0; Index <= 16; Index++) {
Count[Index] = 0;
}