From ce5354d68ce815d98f31ecc03f71fe9cfccedc39 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Fri, 6 Jan 2017 16:12:59 +0800 Subject: [PATCH] SignedCapsulePkg/CapsuleLib: Refine to compare with same type Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Jiewen Yao --- .../Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c b/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c index 18205519bf..dfd8d107aa 100644 --- a/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c +++ b/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c @@ -6,7 +6,7 @@ CapsuleAuthenticateSystemFirmware(), ExtractAuthenticatedImage() will receive untrusted input and do basic validation. - Copyright (c) 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials 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 @@ -386,7 +386,7 @@ ExtractAuthenticatedImage ( DEBUG((DEBUG_ERROR, "ExtractAuthenticatedImage - dwLength too small\n")); return FALSE; } - if (ImageAuth->AuthInfo.Hdr.dwLength > MAX_UINTN - sizeof(UINT64)) { + if ((UINTN) ImageAuth->AuthInfo.Hdr.dwLength > MAX_UINTN - sizeof(UINT64)) { DEBUG((DEBUG_ERROR, "ExtractAuthenticatedImage - dwLength too big\n")); return FALSE; } -- 2.39.2