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 A59ACD811AC for ; Mon, 26 Feb 2024 17:10:37 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=zt2Kna4JkgegdadG2tHVAPwyNkCHxE/ChEOq1bv02cQ=; 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=1708967436; v=1; b=NxzUTlmj5DupuEdarzndVWUIb8CMoVIJvSMTYqGOWp1CHofq70XKPGTQgV8UHs4VZCN+utqQ nulrAjXUslr5nR4CauHzlGeV9ddQWdjfbJ22STYDezDnb/qitYES3LmHrTnZnYUZeFpRxBFDuHa f0BDxB+/AHZ+FzyFTONQ2VsE= X-Received: by 127.0.0.2 with SMTP id ScoLYY7687511xFI3irkKf71; Mon, 26 Feb 2024 09:10:36 -0800 X-Received: from zrleap.intel-email.com (zrleap.intel-email.com [114.80.218.36]) by mx.groups.io with SMTP id smtpd.web11.615.1708967434902075562 for ; Mon, 26 Feb 2024 09:10:35 -0800 X-Received: from zrleap.intel-email.com (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id EBADCA32E05C for ; Tue, 27 Feb 2024 01:10:32 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id DB595A32E033 for ; Tue, 27 Feb 2024 01:10:32 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by zrleap.intel-email.com (Postfix) with SMTP id 39912A32E06C for ; Tue, 27 Feb 2024 01:10:29 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([114.93.194.54]) (envelope-sender ) by 192.168.6.13 with ESMTP(SSL) for ; Tue, 27 Feb 2024 01:10:20 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 114.93.194.54 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: , Cc: "'Ray Ni'" , "'Rebecca Cran'" , "'Richard Ho'" References: <20240220152157.212-1-mikuback@linux.microsoft.com> In-Reply-To: <20240220152157.212-1-mikuback@linux.microsoft.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHYxIDEvMV0gTWRlTW9kdWxlUGtnL0J1cy9Vc2IvVXNiTmV0d29yazogQ2hlY2sgYXJyYXkgaW5kZXggcmFuZ2UgYmVmb3JlIGFjY2Vzcw==?= Date: Tue, 27 Feb 2024 01:10:21 +0800 Message-ID: <028601da68d6$aeae4ec0$0c0aec40$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQHr9WLGkFuHQTLZbo1aJMWdUoRHT7D5wl3g 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: WAxhwtnPXIqPZvYE4y99mfipx7686176AA= 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=NxzUTlmj; 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=pass (policy=none) header.from=groups.io This change is good to me. 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: 2024=C4=EA2=D4=C220=C8=D5 23:22 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Liming Gao ; Ray Ni ; > Rebecca Cran ; Richard Ho > =D6=F7=CC=E2: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/Bus/Usb/UsbNetwork= : > Check array index range before access >=20 > From: Michael Kubacki >=20 > Checks that an offset used to access array elements is within the > expected range before accessing the array item. >=20 > Cc: Liming Gao > Cc: Ray Ni > Cc: Rebecca Cran > Cc: Richard Ho > Signed-off-by: Michael Kubacki > --- > MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcEcm/UsbEcmFunction.c | > 2 +- > MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcNcm/UsbNcmFunction.c | > 2 +- > MdeModulePkg/Bus/Usb/UsbNetwork/UsbRndis/UsbRndisFunction.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git > a/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcEcm/UsbEcmFunction.c > b/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcEcm/UsbEcmFunction.c > index 29f4508a38ce..0c1f252b85df 100644 > --- a/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcEcm/UsbEcmFunction.c > +++ b/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcEcm/UsbEcmFunction.c > @@ -769,7 +769,7 @@ ConvertFilter ( >=20 > Count =3D sizeof (gTable)/sizeof (gTable[0]); >=20 > - for (Index =3D 0; (gTable[Index].Src !=3D 0) && (Index < Count); Index= ++) { > + for (Index =3D 0; (Index < Count) && (gTable[Index].Src !=3D 0); Index= ++) { > if (gTable[Index].Src & Value) { > *CdcFilter |=3D gTable[Index].Dst; > } > diff --git > a/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcNcm/UsbNcmFunction.c > b/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcNcm/UsbNcmFunction.c > index baa2225bf8a8..ef01a6f5458c 100644 > --- a/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcNcm/UsbNcmFunction.c > +++ > b/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcNcm/UsbNcmFunction.c > @@ -855,7 +855,7 @@ ConvertFilter ( >=20 > Count =3D sizeof (gTable)/sizeof (gTable[0]); >=20 > - for (Index =3D 0; (gTable[Index].Src !=3D 0) && (Index < Count); Index= ++) { > + for (Index =3D 0; (Index < Count) && (gTable[Index].Src !=3D 0); Index= ++) { > if (gTable[Index].Src & Value) { > *CdcFilter |=3D gTable[Index].Dst; > } > diff --git > a/MdeModulePkg/Bus/Usb/UsbNetwork/UsbRndis/UsbRndisFunction.c > b/MdeModulePkg/Bus/Usb/UsbNetwork/UsbRndis/UsbRndisFunction.c > index 2c0dcae4cf96..6d45a1b775ba 100644 > --- a/MdeModulePkg/Bus/Usb/UsbNetwork/UsbRndis/UsbRndisFunction.c > +++ b/MdeModulePkg/Bus/Usb/UsbNetwork/UsbRndis/UsbRndisFunction.c > @@ -803,7 +803,7 @@ ConvertFilter ( >=20 > Count =3D sizeof (gTable)/sizeof (gTable[0]); >=20 > - for (Index =3D 0; (gTable[Index].Src !=3D 0) && (Index < Count); Index= ++) { > + for (Index =3D 0; (Index < Count) && (gTable[Index].Src !=3D 0); Index= ++) { > if (gTable[Index].Src & Value) { > *CdcFilter |=3D gTable[Index].Dst; > } > -- > 2.40.1.vfs.0.0 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#115654): > https://edk2.groups.io/g/devel/message/115654 > Mute This Topic: https://groups.io/mt/104469090/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 (#115977): https://edk2.groups.io/g/devel/message/115977 Mute This Topic: https://groups.io/mt/104586147/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-