From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 67FC521E2DA67 for ; Tue, 15 Aug 2017 23:31:12 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2017 23:33:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,381,1498546800"; d="scan'208";a="140190018" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 15 Aug 2017 23:33:36 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 15 Aug 2017 23:33:36 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 15 Aug 2017 23:33:36 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.236]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.135]) with mapi id 14.03.0319.002; Wed, 16 Aug 2017 14:33:34 +0800 From: "Fu, Siyuan" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Ye, Ting" Thread-Topic: [Patch] NetworkPkg/Ip6Dxe: Fix the bug when checking the DataSize Thread-Index: AQHTFlejGQgymCM8cE+/5aVooQSJrKKGhnOw Date: Wed, 16 Aug 2017 06:33:33 +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: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action 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:31:12 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Fu Siyuan -----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