From 8b66342c6bacc3270ca7a550ef703284eb4b95ce Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Wed, 16 Nov 2016 16:01:57 +0800 Subject: [PATCH] SignedCapsulePkg Universal: Init local variables before using them Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Jiewen Yao --- .../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 58a15e4953..c8c5ba0423 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 9d5832fed2..f5f9827c77 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 ae783ffe4d..fd6641eb3e 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); -- 2.39.5