public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] MdeModulePkg/BmpSupportLib: Allow BMP with extra data
@ 2021-03-23 17:29 Jeff Brasen
  2021-03-23 17:41 ` [EXTERNAL] [edk2-devel] " Bret Barkelew
  0 siblings, 1 reply; 9+ messages in thread
From: Jeff Brasen @ 2021-03-23 17:29 UTC (permalink / raw)
  To: devel; +Cc: jian.j.wang, ao.a.wu, Jeff Brasen

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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-04-16 17:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-23 17:29 [PATCH 1/1] MdeModulePkg/BmpSupportLib: Allow BMP with extra data Jeff Brasen
2021-03-23 17:41 ` [EXTERNAL] [edk2-devel] " Bret Barkelew
2021-03-24 11:31   ` Laszlo Ersek
2021-03-24 15:25     ` Jeff Brasen
2021-03-24 18:26       ` Laszlo Ersek
2021-03-25  3:00         ` Andrew Fish
2021-03-30  1:35           ` Gao, Zhichao
2021-04-01 17:37             ` Bret Barkelew
2021-04-16 17:12               ` Jeff Brasen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox