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 8CD9F818C7 for ; Sun, 25 Dec 2016 18:39:03 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP; 25 Dec 2016 18:39:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,404,1477983600"; d="scan'208";a="43316099" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 25 Dec 2016 18:39:02 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 25 Dec 2016 18:39:02 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 25 Dec 2016 18:39:02 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Mon, 26 Dec 2016 10:39:00 +0800 From: "Ye, Ting" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Fu, Siyuan" Thread-Topic: [Patch] NetworkPkg: Fix potentially uninitialized local variable Thread-Index: AQHSXx1Tc5ykVVGqNESybIpdB+2xW6EZhB/w Date: Mon, 26 Dec 2016 02:39:00 +0000 Message-ID: References: <1482718267-31756-1-git-send-email-jiaxin.wu@intel.com> In-Reply-To: <1482718267-31756-1-git-send-email-jiaxin.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] NetworkPkg: Fix potentially uninitialized local variable 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: Mon, 26 Dec 2016 02:39:03 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ye Ting =20 -----Original Message----- From: Wu, Jiaxin=20 Sent: Monday, December 26, 2016 10:11 AM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Fu, Siyuan ; Wu, Jia= xin Subject: [Patch] NetworkPkg: Fix potentially uninitialized local variable Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- NetworkPkg/HttpDxe/HttpProto.c | 2 ++ NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.= c index 199d575..2e784de 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -1473,10 +1473,12 @@ HttpTransmitTcp ( UINTN BufferSize; NET_FRAGMENT TempFragment; =20 Status =3D EFI_SUCCESS; Buffer =3D NULL; + TempFragment.Len =3D 0; + TempFragment.Bulk =3D NULL; =20 // // Need to encrypt data. // if (HttpInstance->UseHttps) { diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c b/NetworkPkg/T= lsAuthConfigDxe/TlsAuthConfigImpl.c index e81e961..5f04503 100644 --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c @@ -1716,11 +1716,11 @@ TlsAuthConfigAccessCallback ( return EFI_OUT_OF_RESOURCES; } } if (QuestionId =3D=3D KEY_TLS_AUTH_CONFIG_CLIENT_CERT) { LabelId =3D TLS_AUTH_CONFIG_FORMID3_FORM; - } else if (QuestionId =3D=3D KEY_TLS_AUTH_CONFIG_SERVER_CA) { + } else { LabelId =3D TLS_AUTH_CONFIG_FORMID4_FORM; } =20 // // Refresh selected file. -- 1.9.5.msysgit.1