summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Library
diff options
context:
space:
mode:
authorScottie Kuo <scottie.kuo@intel.com>2021-05-21 15:44:30 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-06-15 08:43:25 +0000
commit11b1c1d4b98bc1b5eaaaf9eaa94ecd34eeaba5f9 (patch)
tree2029d35dbf4f17afedcb1f77ffda4a736d2499a0 /SecurityPkg/Library
parent1ad794b6276ed902a838a444504848255ce576c9 (diff)
downloadedk2-11b1c1d4b98bc1b5eaaaf9eaa94ecd34eeaba5f9.tar.gz
edk2-11b1c1d4b98bc1b5eaaaf9eaa94ecd34eeaba5f9.tar.bz2
edk2-11b1c1d4b98bc1b5eaaaf9eaa94ecd34eeaba5f9.zip
SecurityPkg: TcgStorageOpalLib: Initialize SupportedAttributes parameter.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3408 The value of SupportedAttributes in OpalGetSupportedAttributesInfo () is left undetermined, if the caller doesn't initialize it. Initialize it in the function entry. Signed-off-by: Scottie Kuo <scottie.kuo@intel.com> Cc: Qi Zhang <qi1.zhang@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Maggie Chu <maggie.chu@intel.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Acked-by: Jian J Wang <jian.j.wang@intel.com>
Diffstat (limited to 'SecurityPkg/Library')
-rw-r--r--SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
index b58597e61f..c840590e8e 100644
--- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
+++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
@@ -1,7 +1,7 @@
/** @file
Public API for Opal Core library.
-Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -1647,6 +1647,7 @@ OpalGetSupportedAttributesInfo(
NULL_CHECK(OpalBaseComId);
ZeroMem(Buffer, BUFFER_SIZE);
+ ZeroMem(SupportedAttributes, sizeof(OPAL_DISK_SUPPORT_ATTRIBUTE));
ASSERT(sizeof(Buffer) >= sizeof(TCG_SUPPORTED_SECURITY_PROTOCOLS));
//