]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Vlv2TbltDevicePkg FvbRuntimeDxe: Fix CalculateCheckSum16 input incorrect length
authorStar Zeng <star.zeng@intel.com>
Wed, 30 Sep 2015 04:39:34 +0000 (04:39 +0000)
committerlzeng14 <lzeng14@Edk2>
Wed, 30 Sep 2015 04:39:34 +0000 (04:39 +0000)
The input length should be "The size, in bytes, of Buffer.",
the divide sizeof (UINT16) operation is not needed and incorrect.

Cc: David Wei <david.wei@intel.com>
Cc: Tim He <tim.he@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18563 6f19259b-4bc3-4df7-8a09-765794883524

Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbInfo.c

index 832e246d1c9afdec06cbe1b1e7fc6ee2acbfa72a..ad039fb19bc22951c4791964b75a87a2367eb246 100644 (file)
@@ -2,7 +2,7 @@
   Defines data structure that is the volume header found.\r
   These data is intent to decouple FVB driver with FV header.\r
 \r
-Copyright (c) 2006  - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006  - 2015, Intel Corporation. All rights reserved.<BR>\r
                                                                                    \r\r
   This program and the accompanying materials are licensed and made available under\r\r
   the terms and conditions of the BSD License that accompanies this distribution.  \r\r
@@ -156,7 +156,7 @@ GetFvbInfo (
       //\r
       // Update the checksum value of FV header.\r
       //\r
-      FvHeader->Checksum = CalculateCheckSum16 ((UINT16 *) FvHeader, FvHeader->HeaderLength / sizeof (UINT16));\r
+      FvHeader->Checksum = CalculateCheckSum16 ((UINT16 *) FvHeader, FvHeader->HeaderLength);\r
 \r
       *FvbInfo = FvHeader;\r
 \r