public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] CoffeelakeSiliconPkg: Add a needed ZeroMem ()
@ 2019-08-29 23:00 Nate DeSimone
  2019-08-29 23:15 ` [edk2-devel] " Kubacki, Michael A
  0 siblings, 1 reply; 3+ messages in thread
From: Nate DeSimone @ 2019-08-29 23:00 UTC (permalink / raw)
  To: devel; +Cc: Chasel Chiu, Michael Kubacki, Sai Chaganty

AddComponentConfigBlocks () should ZeroMem () the Config Block Header before using it.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 .../Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c          | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c b/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c
index 16a14b3245..3c02a4563c 100644
--- a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c
+++ b/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c
@@ -75,6 +75,7 @@ AddComponentConfigBlocks (
   // Loop to identify each config block from ComponentBlocks[] Table and add each of them
   //
   for (BlockCount = 0 ; BlockCount < TotalBlockCount; BlockCount++) {
+    ZeroMem (&ConfigBlockBuf, sizeof (CONFIG_BLOCK));
     CopyMem (&(ConfigBlockBuf.Header.GuidHob.Name), ComponentBlocks[BlockCount].Guid, sizeof (EFI_GUID));
     ConfigBlockBuf.Header.GuidHob.Header.HobLength = ComponentBlocks[BlockCount].Size;
     ConfigBlockBuf.Header.Revision        = ComponentBlocks[BlockCount].Revision;
-- 
2.17.1.windows.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-30 12:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-29 23:00 [PATCH] CoffeelakeSiliconPkg: Add a needed ZeroMem () Nate DeSimone
2019-08-29 23:15 ` [edk2-devel] " Kubacki, Michael A
2019-08-30 12:39   ` Chiu, Chasel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox