From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 724D6D802DF for ; Fri, 8 Sep 2023 00:40:59 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=C75w5iwlR2pXHCLkDVclC58wy1WeTQkzcZZL6wNh+KE=; c=relaxed/simple; d=groups.io; h=From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Thread-Index:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding:Content-Language; s=20140610; t=1694133658; v=1; b=P3aXZjjSG5SRVtsMQQsvVmMLwsChucVgCLLDhOSCBEhn7+yYbGbzVh3dgao21l5YbpRILCqa 059jO7XGJxvFvu5syW2jR5OGLYrIKBPthFuKqawQkitjOV1sXeKBIsalYsek963236aNngJyODR NjV+l4XVXArVVNBNSxDCVi+o= X-Received: by 127.0.0.2 with SMTP id E2ZQYY7687511x23jyijtFwY; Thu, 07 Sep 2023 17:40:58 -0700 X-Received: from cxsh.intel-email.com (cxsh.intel-email.com [121.46.250.151]) by mx.groups.io with SMTP id smtpd.web10.29419.1694133657119750607 for ; Thu, 07 Sep 2023 17:40:57 -0700 X-Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 80EA3DDA85D for ; Fri, 8 Sep 2023 08:40:55 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 7BC56DDA85B for ; Fri, 8 Sep 2023 08:40:55 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by cxsh.intel-email.com (Postfix) with SMTP id D1534DDA854 for ; Fri, 8 Sep 2023 08:40:52 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP(SSL) for ; Fri, 08 Sep 2023 08:40:49 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: , Cc: "'Zhichao Gao'" , "'Michael D Kinney'" References: <20230906174033.1878-1-mikuback@linux.microsoft.com> In-Reply-To: <20230906174033.1878-1-mikuback@linux.microsoft.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHYxIDEvMV0gU2hlbGxQa2cvVWVmaVNoZWxsTmV0d29yazJDb21tYW5kc0xpYjogQ2hlY2sgYXJyYXkgaW5kZXggYmVmb3JlIGFjY2Vzcw==?= Date: Fri, 8 Sep 2023 08:40:52 +0800 Message-ID: <006d01d9e1ed$1f1997d0$5d4cc770$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQFjsdtpfyAVEnd7fo1WORMbhhXxSrD8dlRw Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,gaoliming@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: iIJSae9lPIdSoV5agH5TGZWxx7686176AA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=P3aXZjjS; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none Michael: How do you detect those issues? Do you use the tool or do code review? For this change, Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA=B1= =ED Michael > Kubacki > =B7=A2=CB=CD=CA=B1=BC=E4: 2023=C4=EA9=D4=C27=C8=D5 1:41 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Zhichao Gao ; Michael D Kinney > > =D6=F7=CC=E2: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellNetwork2Comma= ndsLib: > Check array index before access >=20 > From: Michael Kubacki >=20 > Moves the range check for the index into the array before attempting > any accesses using the array index. >=20 > Cc: Zhichao Gao > Cc: Michael D Kinney > Signed-off-by: Michael Kubacki > --- > ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c > b/ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c > index 7c80bba46581..5cb92c485b47 100644 > --- a/ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c > +++ b/ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c > @@ -382,7 +382,7 @@ IfConfig6PrintIpAddr ( >=20 > ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_IFCONFIG6_INFO_COLON), gShellNetwork2HiiHandle); >=20 > - while ((Ip->Addr[Index] =3D=3D 0) && (Ip->Addr[Index + 1] =3D=3D 0= ) && > (Index < PREFIXMAXLEN)) { > + while ((Index < PREFIXMAXLEN) && (Ip->Addr[Index] =3D=3D 0) && > (Ip->Addr[Index + 1] =3D=3D 0)) { > Index =3D Index + 2; > if (Index > PREFIXMAXLEN - 2) { > break; > -- > 2.42.0.windows.2 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#108336): > https://edk2.groups.io/g/devel/message/108336 > Mute This Topic: https://groups.io/mt/101198333/4905953 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [gaoliming@byosoft.com.cn] > -=3D-=3D-=3D-=3D-=3D-=3D >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108429): https://edk2.groups.io/g/devel/message/108429 Mute This Topic: https://groups.io/mt/101228328/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-