Eric or Ray,

Can you review please?

-----Original Message-----
From: El-Haj-Mahmoud, Samer 
Sent: Thursday, February 18, 2016 6:59 PM
To: [email protected]
Cc: [email protected]; [email protected]; El-Haj-Mahmoud, Samer 
<[email protected]>; El-Haj-Mahmoud, Samer 
<[email protected]>
Subject: [PATCH] MdeModulePkg : Fix a bug in BmpImageDecoderLib

Fix a bug in BmpHeader parameter check

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <[email protected]>
---
 MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.c 
b/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.c
index 6445c06..4102de8 100644
--- a/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.c
+++ b/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.c
@@ -2,6 +2,7 @@
   This library provides BMP image decoding capability.
 
 Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
 This program and the accompanying materials are licensed and made available 
under  the terms and conditions of the BSD License that accompanies this 
distribution.
 The full text of the license may be found at @@ -105,7 +106,7 @@ 
BmpImageDecoderLibConvertBmpToGopBlt (
 
   if ((BmpHeader->Size != BmpImageSize) || 
       (BmpHeader->Size < BmpHeader->ImageOffset) ||
-      (BmpHeader->Size - BmpHeader->ImageOffset !=  BmpHeader->PixelHeight * 
DataSizePerLine)) {
+      (BmpHeader->Size - BmpHeader->ImageOffset !=  
+ BmpHeader->ImageSize)) {
     return EFI_INVALID_PARAMETER;
   }
 
--
2.6.3.windows.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to