summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
diff options
context:
space:
mode:
Diffstat (limited to 'IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c')
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
index fe6d436a56..02ad3a2bb7 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
@@ -1,7 +1,7 @@
/** @file
BDS Lib functions which contain all the code to connect console device
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -808,7 +808,10 @@ ConvertBmpToGopBlt (
ColorMapNum = 0;
break;
}
- if (BmpHeader->ImageOffset - sizeof (BMP_IMAGE_HEADER) != sizeof (BMP_COLOR_MAP) * ColorMapNum) {
+ //
+ // BMP file may has padding data between the bmp header section and the bmp data section.
+ //
+ if (BmpHeader->ImageOffset - sizeof (BMP_IMAGE_HEADER) < sizeof (BMP_COLOR_MAP) * ColorMapNum) {
return EFI_INVALID_PARAMETER;
}
}