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:
czhang46 2012-08-21 02:12:43 +00:00
parent 2fa996f9b7
commit 677e5c0b77
1 changed files with 13 additions and 1 deletions

View File

@ -352,6 +352,10 @@ TcgDxeLogEvent (
{
TCG_DXE_DATA *TcgData;
if (TCGLogData == NULL){
return EFI_INVALID_PARAMETER;
}
TcgData = TCG_DXE_DATA_FROM_THIS (This);
if (TcgData->BsCap.TPMDeactivatedFlag) {
@ -438,7 +442,11 @@ TcgDxeHashLogExtendEventI (
{
EFI_STATUS Status;
if (HashDataLen > 0) {
if (HashData == NULL && HashDataLen > 0) {
return EFI_INVALID_PARAMETER;
}
if (HashDataLen > 0 || HashData != NULL) {
Status = TpmCommHashAll (
HashData,
(UINTN) HashDataLen,
@ -498,6 +506,10 @@ TcgDxeHashLogExtendEvent (
{
TCG_DXE_DATA *TcgData;
if (TCGLogData == NULL || EventLogLastEntry == NULL){
return EFI_INVALID_PARAMETER;
}
TcgData = TCG_DXE_DATA_FROM_THIS (This);
if (TcgData->BsCap.TPMDeactivatedFlag) {