From 73ee3abab1a1b3593de6f31224c0f990dc113bc9 Mon Sep 17 00:00:00 2001 From: Marc-Andr? Lureau Date: Wed, 7 Mar 2018 23:57:39 +0800 Subject: 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 Cc: Chao Zhang Cc: Star Zeng Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marc-Andr? Lureau Reviewed-by: Star Zeng Reviewed-by: Chao Zhang --- SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c | 1 + 1 file changed, 1 insertion(+) (limited to 'SecurityPkg/Library') 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; } // -- cgit v1.2.3