From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: nathaniel.l.desimone@intel.com) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by groups.io with SMTP; Thu, 29 Aug 2019 16:00:20 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Aug 2019 16:00:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,445,1559545200"; d="scan'208";a="193130917" Received: from nldesimo-desk1.amr.corp.intel.com ([10.7.159.63]) by orsmga002.jf.intel.com with ESMTP; 29 Aug 2019 16:00:19 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Chasel Chiu , Michael Kubacki , Sai Chaganty Subject: [PATCH] CoffeelakeSiliconPkg: Add a needed ZeroMem () Date: Thu, 29 Aug 2019 16:00:12 -0700 Message-Id: <20190829230012.30756-1-nathaniel.l.desimone@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 AddComponentConfigBlocks () should ZeroMem () the Config Block Header before using it. Cc: Chasel Chiu Cc: Michael Kubacki Cc: Sai Chaganty Signed-off-by: Nate DeSimone --- .../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