Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <[email protected]>
---
 .../Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c        | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c 
b/SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c
index cd48a1a..25788b8 100644
--- a/SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c
+++ b/SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c
@@ -51,11 +51,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 // Flag to check GPT partition. It only need be measured once.
 //
 BOOLEAN                           mMeasureGptTableFlag = FALSE;
 UINTN                             mMeasureGptCount = 0;
 VOID                              *mFileBuffer;
-UINTN                             mImageSize;
+UINTN                             mTpmImageSize;
 //
 // Measured FV handle cache
 //
 EFI_HANDLE                        mCacheMeasuredHandle  = NULL;
 MEASURED_HOB_DATA                 *mMeasuredHobData     = NULL;
@@ -93,15 +93,15 @@ DxeTpmMeasureBootLibImageRead (
   if (MAX_ADDRESS - FileOffset < *ReadSize) {
     return EFI_INVALID_PARAMETER;
   }
 
   EndPosition = FileOffset + *ReadSize;
-  if (EndPosition > mImageSize) {
-    *ReadSize = (UINT32)(mImageSize - FileOffset);
+  if (EndPosition > mTpmImageSize) {
+    *ReadSize = (UINT32)(mTpmImageSize - FileOffset);
   }
 
-  if (FileOffset >= mImageSize) {
+  if (FileOffset >= mTpmImageSize) {
     *ReadSize = 0;
   }
 
   CopyMem (Buffer, (UINT8 *)((UINTN) FileHandle + FileOffset), *ReadSize);
 
@@ -906,11 +906,11 @@ DxeTpmMeasureBootHandler (
   if (FileBuffer == NULL) {
     Status = EFI_SECURITY_VIOLATION;
     goto Finish;
   }
 
-  mImageSize  = FileSize;
+  mTpmImageSize  = FileSize;
   mFileBuffer = FileBuffer;
 
   //
   // Measure PE Image
   //
-- 
2.6.4.windows.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to