From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1C23C81EEB for ; Wed, 16 Nov 2016 00:26:24 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 16 Nov 2016 00:26:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,647,1473145200"; d="scan'208";a="1085916007" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.34]) by fmsmga002.fm.intel.com with ESMTP; 16 Nov 2016 00:26:27 -0800 From: Hao Wu To: edk2-devel@lists.01.org Cc: Hao Wu , Jiewen Yao Date: Wed, 16 Nov 2016 16:26:25 +0800 Message-Id: <1479284785-12964-1-git-send-email-hao.a.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.0 Subject: [PATCH] SignedCapsulePkg Universal: Init local variables before using them X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2016 08:26:24 -0000 Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- .../Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 3 +++ .../Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c | 3 +++ .../Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c index 58a15e4..c8c5ba0 100644 --- a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c +++ b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c @@ -579,6 +579,9 @@ ProcessRecoveryImage ( VOID *AuthenticatedImage; UINTN AuthenticatedImageSize; + AuthenticatedImage = NULL; + AuthenticatedImageSize = 0; + Status = CapsuleAuthenticateSystemFirmware(Image, Length, TRUE, &LastAttemptVersion, &LastAttemptStatus, &AuthenticatedImage, &AuthenticatedImageSize); if (EFI_ERROR(Status)) { DEBUG((DEBUG_INFO, "CapsuleAuthenticateSystemFirmware - %r\n", Status)); diff --git a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c index 9d5832f..f5f9827 100644 --- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c +++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c @@ -58,6 +58,9 @@ DispatchSystemFmpImages ( EFI_FIRMWARE_VOLUME_HEADER *FvImage; BOOLEAN Result; + AuthenticatedImage = NULL; + AuthenticatedImageSize = 0; + DEBUG((DEBUG_INFO, "DispatchSystemFmpImages\n")); // diff --git a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c index ae783ff..fd6641e 100644 --- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c +++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c @@ -223,6 +223,9 @@ SystemFirmwareAuthenticatedUpdate ( VOID *AuthenticatedImage; UINTN AuthenticatedImageSize; + AuthenticatedImage = NULL; + AuthenticatedImageSize = 0; + DEBUG((DEBUG_INFO, "SystemFirmwareAuthenticatedUpdate...\n")); Status = CapsuleAuthenticateSystemFirmware(Image, ImageSize, FALSE, LastAttemptVersion, LastAttemptStatus, &AuthenticatedImage, &AuthenticatedImageSize); -- 1.9.5.msysgit.0