summaryrefslogtreecommitdiff
path: root/MdePkg/Library
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-11 06:58:28 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-11 06:58:28 +0000
commite74738b1c33dba4ba9b3bde5efe8bdc16e456dc3 (patch)
tree8babfdc08a14fdb58ef41d86a2f49444ba989b3e /MdePkg/Library
parent5796de67925ec05cc7983fe77e9e022b6b24236b (diff)
downloadedk2-platforms-e74738b1c33dba4ba9b3bde5efe8bdc16e456dc3.tar.xz
In PrintXY() and AsciiPrintXY(), the number of chartacter returned is at most PcdUefiLibMaxPrintBufferSize, and will return the number of characters actually displayed on the screen not includng partial characters that may be clipped by the right edge of the display.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8289 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/UefiLib/UefiLibPrint.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/MdePkg/Library/UefiLib/UefiLibPrint.c b/MdePkg/Library/UefiLib/UefiLibPrint.c
index 0ee2c23eb2..fc68e6659a 100644
--- a/MdePkg/Library/UefiLib/UefiLibPrint.c
+++ b/MdePkg/Library/UefiLib/UefiLibPrint.c
@@ -419,8 +419,7 @@ InternalPrintGraphic (
LineBufferLen = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * HorizontalResolution * EFI_GLYPH_HEIGHT;
if (EFI_GLYPH_WIDTH * EFI_GLYPH_HEIGHT * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * PrintNum > LineBufferLen) {
- Status = EFI_INVALID_PARAMETER;
- goto Error;
+ PrintNum = HorizontalResolution / EFI_GLYPH_WIDTH;
}
Blt = (EFI_IMAGE_OUTPUT *) AllocateZeroPool (sizeof (EFI_IMAGE_OUTPUT));