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
This commit is contained in:
@@ -108,6 +108,7 @@ GetBits (
|
|||||||
|
|
||||||
Creates Huffman Code mapping table for Extra Set, Char&Len Set
|
Creates Huffman Code mapping table for Extra Set, Char&Len Set
|
||||||
and Position Set according to code length array.
|
and Position Set according to code length array.
|
||||||
|
If TableBits > 16, then ASSERT ().
|
||||||
|
|
||||||
@param Sd The global scratch data
|
@param Sd The global scratch data
|
||||||
@param NumOfChar Number of symbols in the symbol set
|
@param NumOfChar Number of symbols in the symbol set
|
||||||
@@ -143,6 +144,12 @@ MakeTable (
|
|||||||
UINT16 WordOfStart;
|
UINT16 WordOfStart;
|
||||||
UINT16 WordOfCount;
|
UINT16 WordOfCount;
|
||||||
|
|
||||||
|
//
|
||||||
|
// The maximum mapping table width supported by this internal
|
||||||
|
// working function is 16.
|
||||||
|
//
|
||||||
|
ASSERT (TableBits <= 16);
|
||||||
|
|
||||||
for (Index = 0; Index <= 16; Index++) {
|
for (Index = 0; Index <= 16; Index++) {
|
||||||
Count[Index] = 0;
|
Count[Index] = 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user