summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Library
diff options
context:
space:
mode:
authorMarc-Andr? Lureau <marcandre.lureau@redhat.com>2018-03-07 23:57:39 +0800
committerZhang, Chao B <chao.b.zhang@intel.com>2018-03-08 22:41:50 +0800
commit73ee3abab1a1b3593de6f31224c0f990dc113bc9 (patch)
treee95adbd6445e93faf097c6669c952649998979cb /SecurityPkg/Library
parenta998027ba8b809c0033ee2147f09c4ff0d19854e (diff)
downloadedk2-73ee3abab1a1b3593de6f31224c0f990dc113bc9.tar.gz
edk2-73ee3abab1a1b3593de6f31224c0f990dc113bc9.tar.bz2
edk2-73ee3abab1a1b3593de6f31224c0f990dc113bc9.zip
SecurityPkg: also clear HashInterfaceHob.SupportedHashMask
Commit 4cc2b63bd829426b05bad0d8952f1855a10d6ed7 fixed an out of bounds ZeroMem() call. However, as Laszlo Ersek pointed out, the intent was to clear all but the Identifier (to revert the effect of RegisterHashInterfaceLib()). For that, it should clear the SupportedHashMask too. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Diffstat (limited to 'SecurityPkg/Library')
-rw-r--r--SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c
index 361a4f6508..bf6e1336ee 100644
--- a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c
+++ b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c
@@ -426,6 +426,7 @@ HashLibBaseCryptoRouterPeiConstructor (
//
ZeroMem (&HashInterfaceHob->HashInterface, sizeof (HashInterfaceHob->HashInterface));
HashInterfaceHob->HashInterfaceCount = 0;
+ HashInterfaceHob->SupportedHashMask = 0;
}
//