summaryrefslogtreecommitdiff
path: root/SignedCapsulePkg/Library
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2017-01-06 16:12:59 +0800
committerHao Wu <hao.a.wu@intel.com>2017-01-12 21:26:30 +0800
commitce5354d68ce815d98f31ecc03f71fe9cfccedc39 (patch)
tree73143b5babfd4ca67fe110c6ac23a66df4f87b52 /SignedCapsulePkg/Library
parentba47ae9352b6024805b03818d9df03bfe06e1821 (diff)
downloadedk2-ce5354d68ce815d98f31ecc03f71fe9cfccedc39.zip
edk2-ce5354d68ce815d98f31ecc03f71fe9cfccedc39.tar.gz
edk2-ce5354d68ce815d98f31ecc03f71fe9cfccedc39.tar.bz2
SignedCapsulePkg/CapsuleLib: Refine to compare with same type
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>
Diffstat (limited to 'SignedCapsulePkg/Library')
-rw-r--r--SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c b/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c
index 1820551..dfd8d10 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.<BR>
+ Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
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;
}