public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Hao Wu <hao.a.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Hao Wu <hao.a.wu@intel.com>, Jiewen Yao <jiewen.yao@intel.com>
Subject: [PATCH] SignedCapsulePkg Universal: Init local variables before using them
Date: Wed, 16 Nov 2016 16:26:25 +0800	[thread overview]
Message-ID: <1479284785-12964-1-git-send-email-hao.a.wu@intel.com> (raw)

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 .../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



             reply	other threads:[~2016-11-16  8:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16  8:26 Hao Wu [this message]
2016-11-16  8:37 ` [PATCH] SignedCapsulePkg Universal: Init local variables before using them Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479284785-12964-1-git-send-email-hao.a.wu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox