]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
Use the ASSERT() for parameter checking as the 4th paramter of internal worker functi...
[mirror_edk2.git] / MdePkg / Library / BaseUefiDecompressLib / BaseUefiDecompressLib.c
index 30f85bce710b868dd978d5bf6781e3f424433b54..f6b1fe005d1cde1185a4cd8fca06a9b6d6384604 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Decompress Library implementation refer to UEFI specification.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
   Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -117,6 +117,7 @@ GetBits (
 \r
   Creates Huffman Code mapping table for Extra Set, Char&Len Set\r
   and Position Set according to code length array.\r
+  If TableBits > 16, then ASSERT ().\r
 \r
   @param  Sd        The global scratch data\r
   @param  NumOfChar Number of symbols in the symbol set\r
@@ -152,6 +153,11 @@ MakeTable (
   UINT16  WordOfStart;\r
   UINT16  WordOfCount;\r
 \r
+  //\r
+  // The maximum mapping table width supported by this internal\r
+  // working function is 16.\r
+  //\r
+  ASSERT (TableBits <= 16);\r
 \r
   for (Index = 0; Index <= 16; Index++) {\r
     Count[Index] = 0;\r