SignedCapsulePkg Universal: Init local variables before using them
authorHao Wu <hao.a.wu@intel.com>
Wed, 16 Nov 2016 08:01:57 +0000 (16:01 +0800)
committerHao Wu <hao.a.wu@intel.com>
Fri, 18 Nov 2016 00:46:37 +0000 (08:46 +0800)
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c
SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c
SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c

index 58a15e4..c8c5ba0 100644 (file)
@@ -579,6 +579,9 @@ ProcessRecoveryImage (
   VOID                        *AuthenticatedImage;\r
   UINTN                       AuthenticatedImageSize;\r
 \r
+  AuthenticatedImage     = NULL;\r
+  AuthenticatedImageSize = 0;\r
+\r
   Status = CapsuleAuthenticateSystemFirmware(Image, Length, TRUE, &LastAttemptVersion, &LastAttemptStatus, &AuthenticatedImage, &AuthenticatedImageSize);\r
   if (EFI_ERROR(Status)) {\r
     DEBUG((DEBUG_INFO, "CapsuleAuthenticateSystemFirmware - %r\n", Status));\r
index 9d5832f..f5f9827 100644 (file)
@@ -58,6 +58,9 @@ DispatchSystemFmpImages (
   EFI_FIRMWARE_VOLUME_HEADER                    *FvImage;\r
   BOOLEAN                                       Result;\r
 \r
+  AuthenticatedImage     = NULL;\r
+  AuthenticatedImageSize = 0;\r
+\r
   DEBUG((DEBUG_INFO, "DispatchSystemFmpImages\n"));\r
 \r
   //\r
index ae783ff..fd6641e 100644 (file)
@@ -223,6 +223,9 @@ SystemFirmwareAuthenticatedUpdate (
   VOID                        *AuthenticatedImage;\r
   UINTN                       AuthenticatedImageSize;\r
 \r
+  AuthenticatedImage     = NULL;\r
+  AuthenticatedImageSize = 0;\r
+\r
   DEBUG((DEBUG_INFO, "SystemFirmwareAuthenticatedUpdate...\n"));\r
 \r
   Status = CapsuleAuthenticateSystemFirmware(Image, ImageSize, FALSE, LastAttemptVersion, LastAttemptStatus, &AuthenticatedImage, &AuthenticatedImageSize);\r