mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 21:54:27 +02:00
Use the ASSERT() for parameter checking as the 4th paramter of internal worker function of MakeTable() must be <= 16.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10472 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
0f127da65a
commit
61f0f4375b
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
UEFI Decompress Library implementation refer to UEFI specification.
|
UEFI Decompress Library implementation refer to UEFI specification.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||||
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -117,6 +117,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
|
||||||
@ -152,6 +153,11 @@ 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;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Internal data structure defintions for Base UEFI Decompress Libary.
|
Internal data structure defintions for Base UEFI Decompress Libary.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -107,6 +107,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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user