Weiyi: This patch doesn't pass CI. Please check https://github.com/tianocore/edk2/pull/3208
> -----邮件原件----- > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 gaoliming via > groups.io > 发送时间: 2022年8月12日 12:53 > 收件人: 'Wenyi Xie' <xiewen...@huawei.com>; devel@edk2.groups.io; > jian.j.w...@intel.com; zhichao....@intel.com; ray...@intel.com > 抄送: songdongku...@huawei.com > 主题: [edk2-devel] 回复: [PATCH EDK2 v1 1/1] > MdeModulePkg/BaseBmpSupportLib: Fix ColorMap issue > > Agree this fix to add the check for this case. Reviewed-by: Liming Gao > <gaolim...@byosoft.com.cn> > > Thanks > Liming > > -----邮件原件----- > > 发件人: Wenyi Xie <xiewen...@huawei.com> > > 发送时间: 2022年8月11日 16:32 > > 收件人: devel@edk2.groups.io; jian.j.w...@intel.com; > > gaolim...@byosoft.com.cn; zhichao....@intel.com; ray...@intel.com > > 抄送: songdongku...@huawei.com; xiewen...@huawei.com > > 主题: [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 <jian.j.w...@intel.com> > > Cc: Liming Gao <gaolim...@byosoft.com.cn> > > Cc: Zhichao Gao <zhichao....@intel.com> > > Cc: Ray Ni <ray...@intel.com> > > Signed-off-by: Wenyi Xie <xiewen...@huawei.com> > > --- > > 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 == sizeof (BMP_IMAGE_HEADER)) && > > + ((BmpHeader->BitPerPixel & 0x0D) != 0)) { > > + return RETURN_UNSUPPORTED; > > + } > > + > > if (BmpHeader->ImageOffset > sizeof (BMP_IMAGE_HEADER)) { > > switch (BmpHeader->BitPerPixel) { > > case 1: > > -- > > 2.20.1.windows.1 > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92503): https://edk2.groups.io/g/devel/message/92503 Mute This Topic: https://groups.io/mt/93076276/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-