]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Use the ASSERT() for parameter checking as the 4th paramter of internal worker functi...
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 10 May 2010 00:57:06 +0000 (00:57 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 10 May 2010 00:57:06 +0000 (00:57 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10472 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternals.h

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
index a0e44dc07640a19ce1fa1ab7a538fd57132ca666..856c1f7b017b27a16e32acb1a61ec7bbba63edb2 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Internal data structure defintions for Base UEFI Decompress Libary.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2010, Intel Corporation. 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
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -107,6 +107,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