diff options
author | Zhiguang Liu <zhiguang.liu@intel.com> | 2020-09-01 08:55:05 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-09-01 16:11:24 +0000 |
commit | 46db105b7b77bc478452887e25836cd0745e9b65 (patch) | |
tree | 88421be098c3492019c10f191056a34530ae01d6 /SecurityPkg | |
parent | 0c5c45a1337f82569aa9e60323e1a05a0cbbad74 (diff) | |
download | edk2-46db105b7b77bc478452887e25836cd0745e9b65.tar.gz edk2-46db105b7b77bc478452887e25836cd0745e9b65.tar.bz2 edk2-46db105b7b77bc478452887e25836cd0745e9b65.zip |
SecurityPkg: Initailize variable Status before it is consumed.
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 <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Message-Id: <20200901005505.1722-1-zhiguang.liu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'SecurityPkg')
-rw-r--r-- | SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c index 0e770f4485..93a8803ff6 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c @@ -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,
|