Skip to content

Commit

Permalink
SecurityPkg: Initailize variable Status before it is consumed.
Browse files Browse the repository at this point in the history
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2945

V2: Move "Status = EFI_SUCCESS;" before the EDKII_TCG_PRE_HASH check.

Cc: Jiewen Yao <[email protected]>
Cc: Jian J Wang <[email protected]>
Cc: Qi Zhang <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Reviewed-by: Jiewen Yao <[email protected]>
Signed-off-by: Zhiguang Liu <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
  • Loading branch information
LiuZhiguang001 authored and mergify[bot] committed Sep 1, 2020
1 parent 0c5c45a commit 46db105
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ HashLogExtendEvent (
if ((Flags & EDKII_TCG_PRE_HASH) != 0 || (Flags & EDKII_TCG_PRE_HASH_LOG_ONLY) != 0) {
ZeroMem (&DigestList, sizeof(DigestList));
CopyMem (&DigestList, HashData, sizeof(DigestList));
Status = EFI_SUCCESS;
if ((Flags & EDKII_TCG_PRE_HASH) !=0 ) {
Status = Tpm2PcrExtend (
NewEventHdr->PCRIndex,
Expand Down

0 comments on commit 46db105

Please sign in to comment.