]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Refine code to make it more safely.
authorEric Dong <eric.dong@intel.com>
Thu, 26 Jun 2014 03:17:59 +0000 (03:17 +0000)
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 26 Jun 2014 03:17:59 +0000 (03:17 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15596 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c

index 15c3325cd4eb2f3cd39a2d6acc3fa258039180c3..e59a9de3d1d6de693a8124d9db73bdeff13c3e7c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Decompress Library implementation refer to UEFI specification.\r
 \r
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2014, 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
@@ -333,6 +333,7 @@ ReadPTLen (
   UINT16  Index;\r
   UINT32  Mask;\r
 \r
+  ASSERT (nn <= NPT);\r
   //\r
   // Read Extra Set Code Length Array size \r
   //\r