From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 BF42D81EA8 for ; Wed, 16 Nov 2016 00:37:44 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP; 16 Nov 2016 00:37:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,647,1473145200"; d="scan'208";a="31958235" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga006.fm.intel.com with ESMTP; 16 Nov 2016 00:37:49 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 16 Nov 2016 00:37:49 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 16 Nov 2016 00:37:48 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.239]) with mapi id 14.03.0248.002; Wed, 16 Nov 2016 16:37:46 +0800 From: "Yao, Jiewen" To: "Wu, Hao A" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] SignedCapsulePkg Universal: Init local variables before using them Thread-Index: AQHSP+M0U+Kxk8Srm0S+evBjVi7scaDbSZdQ Date: Wed, 16 Nov 2016 08:37:45 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C50386D22AE@shsmsx102.ccr.corp.intel.com> References: <1479284785-12964-1-git-send-email-hao.a.wu@intel.com> In-Reply-To: <1479284785-12964-1-git-send-email-hao.a.wu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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:37:44 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: jiewen.yao@intel.com > -----Original Message----- > From: Wu, Hao A > Sent: Wednesday, November 16, 2016 4:26 PM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A ; Yao, Jiewen > Subject: [PATCH] SignedCapsulePkg Universal: Init local variables before > using them >=20 > 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(+) >=20 > diff --git > a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLo > adPei.c > b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLo > adPei.c > index 58a15e4..c8c5ba0 100644 > --- > a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLo > adPei.c > +++ > b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLo > adPei.c > @@ -579,6 +579,9 @@ ProcessRecoveryImage ( > VOID *AuthenticatedImage; > UINTN AuthenticatedImageSize; >=20 > + AuthenticatedImage =3D NULL; > + AuthenticatedImageSize =3D 0; > + > Status =3D 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/SystemFirmwareRep > ortDxe.c > b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRep > ortDxe.c > index 9d5832f..f5f9827 100644 > --- > a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRep > ortDxe.c > +++ > b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRep > ortDxe.c > @@ -58,6 +58,9 @@ DispatchSystemFmpImages ( > EFI_FIRMWARE_VOLUME_HEADER *FvImage; > BOOLEAN Result; >=20 > + AuthenticatedImage =3D NULL; > + AuthenticatedImageSize =3D 0; > + > DEBUG((DEBUG_INFO, "DispatchSystemFmpImages\n")); >=20 > // > diff --git > a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUp > dateDxe.c > b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUp > dateDxe.c > index ae783ff..fd6641e 100644 > --- > a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUp > dateDxe.c > +++ > b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUp > dateDxe.c > @@ -223,6 +223,9 @@ SystemFirmwareAuthenticatedUpdate ( > VOID *AuthenticatedImage; > UINTN AuthenticatedImageSize; >=20 > + AuthenticatedImage =3D NULL; > + AuthenticatedImageSize =3D 0; > + > DEBUG((DEBUG_INFO, "SystemFirmwareAuthenticatedUpdate...\n")); >=20 > Status =3D CapsuleAuthenticateSystemFirmware(Image, ImageSize, FALSE, > LastAttemptVersion, LastAttemptStatus, &AuthenticatedImage, > &AuthenticatedImageSize); > -- > 1.9.5.msysgit.0