qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 1/8] SecurityPkg: also clear HashInterfaceHob.Sup


From: marcandre . lureau
Subject: [Qemu-devel] [PATCH v2 1/8] SecurityPkg: also clear HashInterfaceHob.SupportedHashMask
Date: Wed, 7 Mar 2018 16:57:39 +0100

From: Marc-André Lureau <address@hidden>

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 <address@hidden>
Cc: Chao Zhang <address@hidden>
Cc: Star Zeng <address@hidden>
Cc: Laszlo Ersek <address@hidden>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marc-André Lureau <address@hidden>
---
 .../Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c 
b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c
index 361a4f6508a0..bf6e1336ee76 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;
   }
 
   //
-- 
2.16.2.346.g9779355e34




reply via email to

[Prev in Thread] Current Thread [Next in Thread]