Is this a *good* idea?

What is considered valid extra data? If it’s immaterial to the FW displaying 
the image, our policy has been to strip it off BEFORE adding it to the FW image.

- Bret

From: Jeff Brasen via groups.io<mailto:jbrasen=nvidia....@groups.io>
Sent: Tuesday, March 23, 2021 10:29 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: jian.j.w...@intel.com<mailto:jian.j.w...@intel.com>; 
ao.a...@intel.com<mailto:ao.a...@intel.com>; Jeff 
Brasen<mailto:jbra...@nvidia.com>
Subject: [EXTERNAL] [edk2-devel] [PATCH 1/1] MdeModulePkg/BmpSupportLib: Allow 
BMP with extra data

Add support for processing BMP data that contains extra data after the
image array, this data will not be parsed in anyway in the library but
images that contain this will not be rejected from processing.

---
 MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c 
b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
index 3ac31f6723d0..944d01fe7cdf 100644
--- a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
+++ b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
@@ -213,7 +213,7 @@ TranslateBmpToGopBlt (

   if ((BmpHeader->Size != BmpImageSize) ||
       (BmpHeader->Size < BmpHeader->ImageOffset) ||
-      (BmpHeader->Size - BmpHeader->ImageOffset != DataSize)) {
+      (BmpHeader->Size - BmpHeader->ImageOffset < DataSize)) {

     DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: invalid BmpImage... \n"));
     DEBUG ((DEBUG_ERROR, "   BmpHeader->Size: 0x%x\n", BmpHeader->Size));
--
2.25.1








-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#73194): https://edk2.groups.io/g/devel/message/73194
Mute This Topic: https://groups.io/mt/81556871/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to