SecurityPkg: only clear HashInterface information
The ZeroMem() call goes beyond the HashInterfaceHob structure, causing HOB list corruption. Instead, just clear the HashInterface fields, as I suppose was originally intended. 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: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
7db1458f75
commit
4cc2b63bd8
|
@ -424,7 +424,8 @@ HashLibBaseCryptoRouterPeiConstructor (
|
||||||
// This is the second execution of this module, clear the hash interface
|
// This is the second execution of this module, clear the hash interface
|
||||||
// information registered at its first execution.
|
// information registered at its first execution.
|
||||||
//
|
//
|
||||||
ZeroMem (&HashInterfaceHob->HashInterface, sizeof (*HashInterfaceHob) - sizeof (EFI_GUID));
|
ZeroMem (&HashInterfaceHob->HashInterface, sizeof (HashInterfaceHob->HashInterface));
|
||||||
|
HashInterfaceHob->HashInterfaceCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue