From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web08.26210.1660721684338968611 for ; Wed, 17 Aug 2022 00:34:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=JuOy+VOl; spf=pass (domain: byosoft.com.cn, ip: 101.227.64.242, mailfrom: gaoliming@byosoft.com.cn) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id BF4FECD1F806 for ; Wed, 17 Aug 2022 15:34:39 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1660721679; bh=e1v7nQofdDC186ihqC8WctEtEN5DoslZ9QdqX4Ixonc=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=JuOy+VOl1Y3mD400T3Bs/sULKYUTEBjriiAcgY12iDuFbm7hZJPG42f2lJxSrWsQF fudOIjJ/+ysrDuwso16Ue2iOfowjbv8aMYXiBIKnq2tWXskx4jr5GCEUR7GamaX5UD aoGqgoP9usPRWCRJqu1R571iLQ2pPYRYQYRSFItA= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id BAF25CD1F814 for ; Wed, 17 Aug 2022 15:34:39 +0800 (CST) X-Virus-Scanned: by SpamTitan at intel-email.com Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id A61B8CD1F80B for ; Wed, 17 Aug 2022 15:34:38 +0800 (CST) Authentication-Results: walk.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id 30B59CD1F7F3 for ; Wed, 17 Aug 2022 15:34:35 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 17 Aug 2022 15:34:34 +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" To: , , "'Wenyi Xie'" , , , Cc: References: <20220811083146.3954530-1-xiewenyi2@huawei.com> <20220811083146.3954530-2-xiewenyi2@huawei.com> <170A7FD7925DB3CB.15571@groups.io> In-Reply-To: <170A7FD7925DB3CB.15571@groups.io> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0g5Zue5aSNOiBbUEFUQ0ggRURLMiB2MSAxLzFdIE1kZU1vZHVsZVBrZy9CYXNlQm1wU3VwcG9ydExpYjogRml4IENvbG9yTWFwIGlzc3Vl?= Date: Wed, 17 Aug 2022 15:34:35 +0800 Message-ID: <033901d8b20b$ccb57ca0$662075e0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQH5QvExGp9+YsYd6mLRFTnC4ZYHMgFCeWkqAnScfiCtU9fe8A== Sender: "gaoliming" Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Weiyi: This patch doesn't pass CI. Please check https://github.com/tianocore/edk2/pull/3208 > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA=B1= =ED gaoliming via > groups.io > =B7=A2=CB=CD=CA=B1=BC=E4: 2022=C4=EA8=D4=C212=C8=D5 12:53 > =CA=D5=BC=FE=C8=CB: 'Wenyi Xie' ; devel@edk2.groups= .io; > jian.j.wang@intel.com; zhichao.gao@intel.com; ray.ni@intel.com > =B3=AD=CB=CD: songdongkuang@huawei.com > =D6=F7=CC=E2: [edk2-devel] =BB=D8=B8=B4: [PATCH EDK2 v1 1/1] > MdeModulePkg/BaseBmpSupportLib: Fix ColorMap issue >=20 > Agree this fix to add the check for this case. Reviewed-by: Liming Gao > >=20 > Thanks > Liming > > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > > =B7=A2=BC=FE=C8=CB: Wenyi Xie > > =B7=A2=CB=CD=CA=B1=BC=E4: 2022=C4=EA8=D4=C211=C8=D5 16:32 > > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io; jian.j.wang@intel.com; > > gaoliming@byosoft.com.cn; zhichao.gao@intel.com; ray.ni@intel.com > > =B3=AD=CB=CD: songdongkuang@huawei.com; xiewenyi2@huawei.com > > =D6=F7=CC=E2: [PATCH EDK2 v1 1/1] MdeModulePkg/BaseBmpSupportLib: Fix > > ColorMap issue > > > > When BitPerPixel is 1,4,8, there should be a color map in bmp file. But if > > the format of bmp file is error, it maybe has no color map when > BitPerPixel > > is 1,4,8. The condition checking now can not catch this issue. > > > > Cc: Jian J Wang > > Cc: Liming Gao > > Cc: Zhichao Gao > > Cc: Ray Ni > > Signed-off-by: Wenyi Xie > > --- > > MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c > > b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c > > index c5e885d7a6d5..bea89d530de6 100644 > > --- a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c > > +++ b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c > > @@ -236,6 +236,11 @@ TranslateBmpToGopBlt ( > > return RETURN_UNSUPPORTED; > > } > > > > + if ((BmpHeader->ImageOffset =3D=3D sizeof (BMP_IMAGE_HEADER)) && > > + ((BmpHeader->BitPerPixel & 0x0D) !=3D 0)) { > > + return RETURN_UNSUPPORTED; > > + } > > + > > if (BmpHeader->ImageOffset > sizeof (BMP_IMAGE_HEADER)) { > > switch (BmpHeader->BitPerPixel) { > > case 1: > > -- > > 2.20.1.windows.1 >=20 >=20 >=20 >=20 >=20 >=20 >=20