]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg: also clear HashInterfaceHob.SupportedHashMask
authorMarc-Andr? Lureau <marcandre.lureau@redhat.com>
Wed, 7 Mar 2018 15:57:39 +0000 (23:57 +0800)
committerZhang, Chao B <chao.b.zhang@intel.com>
Thu, 8 Mar 2018 14:41:50 +0000 (22:41 +0800)
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>
SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c

index 361a4f6508a0e32f9660f3ef06458a89440c6532..bf6e1336ee76bd7ef162e445aa86f4d8eb0cb41a 100644 (file)
@@ -426,6 +426,7 @@ HashLibBaseCryptoRouterPeiConstructor (
     //\r
     ZeroMem (&HashInterfaceHob->HashInterface, sizeof (HashInterfaceHob->HashInterface));\r
     HashInterfaceHob->HashInterfaceCount = 0;\r
     //\r
     ZeroMem (&HashInterfaceHob->HashInterface, sizeof (HashInterfaceHob->HashInterface));\r
     HashInterfaceHob->HashInterfaceCount = 0;\r
+    HashInterfaceHob->SupportedHashMask = 0;\r
   }\r
 \r
   //\r
   }\r
 \r
   //\r