The input length should be "The size, in bytes, of Buffer.", the divide sizeof (UINT16) operation is not needed and incorrect.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.z...@intel.com> Cc: David Wei <david....@intel.com> Cc: Tim He <tim...@intel.com> --- Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbInfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbInfo.c b/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbInfo.c index 832e246..ad039fb 100644 --- a/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbInfo.c +++ b/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbInfo.c @@ -2,7 +2,7 @@ Defines data structure that is the volume header found. These data is intent to decouple FVB driver with FV header. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2006 - 2015, 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 that accompanies this distribution. @@ -156,7 +156,7 @@ GetFvbInfo ( // // Update the checksum value of FV header. // - FvHeader->Checksum = CalculateCheckSum16 ((UINT16 *) FvHeader, FvHeader->HeaderLength / sizeof (UINT16)); + FvHeader->Checksum = CalculateCheckSum16 ((UINT16 *) FvHeader, FvHeader->HeaderLength); *FvbInfo = FvHeader; -- 1.9.5.msysgit.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel