diff options
author | Hao Wu <hao.a.wu@intel.com> | 2017-01-06 16:11:26 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2017-01-12 21:26:29 +0800 |
commit | ba47ae9352b6024805b03818d9df03bfe06e1821 (patch) | |
tree | 21eadcf064205050c5f86d0f9dd84f966ebc7b09 /SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.c | |
parent | b35ace177744dbb004201cc306aa3be3d435bf9a (diff) | |
download | edk2-platforms-ba47ae9352b6024805b03818d9df03bfe06e1821.tar.xz |
SecurityPkg/FmpAuthenticationLib: 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 'SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.c')
-rw-r--r-- | SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.c b/SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.c index d79f270900..69c637c764 100644 --- a/SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.c +++ b/SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.c @@ -10,7 +10,7 @@ FmpAuthenticatedHandlerPkcs7(), AuthenticateFmpImage() 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
@@ -181,7 +181,7 @@ AuthenticateFmpImage ( DEBUG((DEBUG_ERROR, "AuthenticateFmpImage - dwLength too small\n"));
return RETURN_INVALID_PARAMETER;
}
- if (Image->AuthInfo.Hdr.dwLength > MAX_UINTN - sizeof(UINT64)) {
+ if ((UINTN) Image->AuthInfo.Hdr.dwLength > MAX_UINTN - sizeof(UINT64)) {
DEBUG((DEBUG_ERROR, "AuthenticateFmpImage - dwLength too big\n"));
return RETURN_INVALID_PARAMETER;
}
|