summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-05-24 02:45:17 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-05-24 02:45:17 +0000
commit14531b13909c611730888ce9228f715d33f0ea73 (patch)
treecca3de6fe1339d5d0c78e625a4437fbe4c2a4eb0 /IntelFrameworkModulePkg/Library
parentec7cb6ab3e3621ab08aab3392182ba75390867bd (diff)
downloadedk2-platforms-14531b13909c611730888ce9228f715d33f0ea73.tar.xz
Use the ASSERT() for parameter checking as the 4th parameter of internal worker function of MakeTable() must be <= 16.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10540 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Library')
-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;
}