TrEEMeasureGptTable() function will receive untrusted GPT partition table, and parse\r
partition data carefully.\r
\r
-Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
ImageLoad->ImageLengthInMemory = ImageSize;\r
ImageLoad->ImageLinkTimeAddress = LinkTimeBase;\r
ImageLoad->LengthOfDevicePath = FilePathSize;\r
- CopyMem (ImageLoad->DevicePath, FilePath, FilePathSize);\r
+ if ((FilePath != NULL) && (FilePathSize != 0)) {\r
+ CopyMem (ImageLoad->DevicePath, FilePath, FilePathSize);\r
+ }\r
\r
//\r
// Log the PE data\r
TreeProtocol, \r
&ProtocolCapability\r
);\r
- if (EFI_ERROR (Status) || !ProtocolCapability.TrEEPresentFlag) {\r
+ if (EFI_ERROR (Status) || (!ProtocolCapability.TrEEPresentFlag)) {\r
//\r
// TPM device doesn't work or activate.\r
//\r
// Measure GPT disk.\r
//\r
Status = TrEEMeasureGptTable (TreeProtocol, Handle);\r
- DEBUG ((EFI_D_ERROR, "DxeTpm2MeasureBootHandler - TrEEMeasureGptTable - %r\n", Status));\r
+ DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - TrEEMeasureGptTable - %r\n", Status));\r
if (!EFI_ERROR (Status)) {\r
//\r
// GPT disk check done.\r
ImageContext.ImageType, \r
DevicePathNode\r
);\r
- DEBUG ((EFI_D_ERROR, "DxeTpm2MeasureBootHandler - TrEEMeasurePeImage - %r\n", Status));\r
+ DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - TrEEMeasurePeImage - %r\n", Status));\r
}\r
\r
//\r
FreePool (OrigDevicePathNode);\r
}\r
\r
- DEBUG ((EFI_D_ERROR, "DxeTpm2MeasureBootHandler - %r\n", Status));\r
+ DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - %r\n", Status));\r
\r
return Status;\r
}\r