mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
ba47ae9352
commit
ce5354d68c
|
@ -6,7 +6,7 @@
|
||||||
CapsuleAuthenticateSystemFirmware(), ExtractAuthenticatedImage() will receive
|
CapsuleAuthenticateSystemFirmware(), ExtractAuthenticatedImage() will receive
|
||||||
untrusted input and do basic validation.
|
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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
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"));
|
DEBUG((DEBUG_ERROR, "ExtractAuthenticatedImage - dwLength too small\n"));
|
||||||
return FALSE;
|
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"));
|
DEBUG((DEBUG_ERROR, "ExtractAuthenticatedImage - dwLength too big\n"));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue