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 (#73193): https://edk2.groups.io/g/devel/message/73193
Mute This Topic: https://groups.io/mt/81556610/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to