]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SignedCapsulePkg/CapsuleLib: Refine to compare with same type
authorHao Wu <hao.a.wu@intel.com>
Fri, 6 Jan 2017 08:12:59 +0000 (16:12 +0800)
committerHao Wu <hao.a.wu@intel.com>
Thu, 12 Jan 2017 13:26:30 +0000 (21:26 +0800)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c

index 18205519bf3d7ffc208ea2d3012221e3ee592816..dfd8d107aabc78c55ba98bfea14e942caa2b18d0 100644 (file)
@@ -6,7 +6,7 @@
   CapsuleAuthenticateSystemFirmware(), ExtractAuthenticatedImage() will receive\r
   untrusted input and do basic validation.\r
 \r
-  Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2016 - 2017, 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
@@ -386,7 +386,7 @@ ExtractAuthenticatedImage (
     DEBUG((DEBUG_ERROR, "ExtractAuthenticatedImage - dwLength too small\n"));\r
     return FALSE;\r
   }\r
-  if (ImageAuth->AuthInfo.Hdr.dwLength > MAX_UINTN - sizeof(UINT64)) {\r
+  if ((UINTN) ImageAuth->AuthInfo.Hdr.dwLength > MAX_UINTN - sizeof(UINT64)) {\r
     DEBUG((DEBUG_ERROR, "ExtractAuthenticatedImage - dwLength too big\n"));\r
     return FALSE;\r
   }\r