From e74738b1c33dba4ba9b3bde5efe8bdc16e456dc3 Mon Sep 17 00:00:00 2001 From: eric_tian Date: Mon, 11 May 2009 06:58:28 +0000 Subject: [PATCH 1/1] 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 --- MdePkg/Library/UefiLib/UefiLibPrint.c | 3 +-- 1 file changed, 1 insertion(+), 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)); -- 2.39.5