mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
Fix TCG protocol TcgDxeHashLogExtendEvent and TcgDxeLogEvent SDL issue
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by : Fu, Siyuan <siyuan.fu@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13652 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2fa996f9b7
commit
677e5c0b77
@ -352,6 +352,10 @@ TcgDxeLogEvent (
|
|||||||
{
|
{
|
||||||
TCG_DXE_DATA *TcgData;
|
TCG_DXE_DATA *TcgData;
|
||||||
|
|
||||||
|
if (TCGLogData == NULL){
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
TcgData = TCG_DXE_DATA_FROM_THIS (This);
|
TcgData = TCG_DXE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
if (TcgData->BsCap.TPMDeactivatedFlag) {
|
if (TcgData->BsCap.TPMDeactivatedFlag) {
|
||||||
@ -438,7 +442,11 @@ TcgDxeHashLogExtendEventI (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
if (HashDataLen > 0) {
|
if (HashData == NULL && HashDataLen > 0) {
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (HashDataLen > 0 || HashData != NULL) {
|
||||||
Status = TpmCommHashAll (
|
Status = TpmCommHashAll (
|
||||||
HashData,
|
HashData,
|
||||||
(UINTN) HashDataLen,
|
(UINTN) HashDataLen,
|
||||||
@ -498,6 +506,10 @@ TcgDxeHashLogExtendEvent (
|
|||||||
{
|
{
|
||||||
TCG_DXE_DATA *TcgData;
|
TCG_DXE_DATA *TcgData;
|
||||||
|
|
||||||
|
if (TCGLogData == NULL || EventLogLastEntry == NULL){
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
TcgData = TCG_DXE_DATA_FROM_THIS (This);
|
TcgData = TCG_DXE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
if (TcgData->BsCap.TPMDeactivatedFlag) {
|
if (TcgData->BsCap.TPMDeactivatedFlag) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user