Re: [edk2] [PATCH] MdeModulePkg : Fix a bug in BmpImageDecoderLib

2016-02-21 Thread Jordan Justen
This commit message doesn't seem very useful. I would suggest
something like:

===

MdeModulePkg BmpImageDecoderLib: Fix image size check

The previous code did work with some images. For example ... (explain
what type of image didn't work).

===

-Jordan

On 2016-02-18 16:59:26, Samer El-Haj-Mahmoud wrote:
> Fix a bug in BmpHeader parameter check
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Samer El-Haj-Mahmoud 
> ---
>  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.
> +(C) Copyright 2016 Hewlett Packard Enterprise Development LP
>  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
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] MdeModulePkg : Fix a bug in BmpImageDecoderLib

2016-02-21 Thread El-Haj-Mahmoud, Samer
Eric or Ray,

Can you review please?

-Original Message-
From: El-Haj-Mahmoud, Samer 
Sent: Thursday, February 18, 2016 6:59 PM
To: edk2-devel@lists.01.org
Cc: eric.d...@intel.com; ruiyu...@intel.com; El-Haj-Mahmoud, Samer 
; El-Haj-Mahmoud, Samer 

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 
---
 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.
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP
 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
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] MdeModulePkg : Fix a bug in BmpImageDecoderLib

2016-02-18 Thread Samer El-Haj-Mahmoud
Fix a bug in BmpHeader parameter check

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud 
---
 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.
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP
 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
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel