From nobody Thu Dec 26 12:42:10 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1502864363734895.7059642987738; Tue, 15 Aug 2017 23:19:23 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 15C7521E2DA7F; Tue, 15 Aug 2017 23:16:55 -0700 (PDT) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 E36C721E2DA59 for ; Tue, 15 Aug 2017 23:16:53 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP; 15 Aug 2017 23:19:19 -0700 Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.167]) by fmsmga006.fm.intel.com with ESMTP; 15 Aug 2017 23:19:18 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,381,1498546800"; d="scan'208";a="140812743" From: Jiaxin Wu To: edk2-devel@lists.01.org Date: Wed, 16 Aug 2017 14:19:17 +0800 Message-Id: <1502864357-18332-1-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [edk2] [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: , Cc: Ye Ting , Fu Siyuan , Wu Jiaxin MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Fu Siyuan Reviewed-by: Ye Ting =20 --- 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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel