From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 03E0021E2DA43 for ; Tue, 15 Aug 2017 23:59:58 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2017 00:02:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,381,1498546800"; d="scan'208";a="119509325" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 16 Aug 2017 00:02:02 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 16 Aug 2017 00:02:02 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 16 Aug 2017 00:02:02 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.236]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.25]) with mapi id 14.03.0319.002; Wed, 16 Aug 2017 15:02:00 +0800 From: "Ye, Ting" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Fu, Siyuan" Thread-Topic: [Patch] NetworkPkg/Ip6Dxe: Fix the bug when checking the DataSize Thread-Index: AQHTFlejUvMU+ELMTUGavvr9qFycnKKGjlWA Date: Wed, 16 Aug 2017 07:02:00 +0000 Message-ID: References: <1502864357-18332-1-git-send-email-jiaxin.wu@intel.com> In-Reply-To: <1502864357-18332-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/Ip6Dxe: Fix the bug when checking the DataSize X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2017 06:59:59 -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: Wednesday, August 16, 2017 2:19 PM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Fu, Siyuan ; Wu, Jia= xin Subject: [Patch] NetworkPkg/Ip6Dxe: Fix the bug when checking the DataSize During setting the DnsServer, the DataSize check is incorrect. This patch is to fix the issue. Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6Confi= gImpl.c index 61418e2..f4b9374 100644 --- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c @@ -1464,11 +1464,11 @@ Ip6ConfigSetDnsServer ( OldDns =3D NULL; NewDns =3D NULL; Item =3D NULL; Tmp =3D NULL; =20 - if ((DataSize =3D=3D 0) && (DataSize % sizeof (EFI_IPv6_ADDRESS) !=3D 0)= ) { + if ((DataSize !=3D 0) && (DataSize % sizeof (EFI_IPv6_ADDRESS) !=3D 0)) = { return EFI_BAD_BUFFER_SIZE; } =20 if (Instance->Policy !=3D Ip6ConfigPolicyManual) { return EFI_WRITE_PROTECTED; --=20 1.9.5.msysgit.1