On 5/11/18 13:54, Marvin Häuser wrote:
The second argument of "UnicodeVSPrintAsciiFormat" is "BufferSize",
which takes the size of the buffer in bytes. Replace the currently
used MAX_DEBUG_MESSAGE_LENGTH reference, which is the buffer's length,
with the actual buffer size.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marvin Haeuser <[email protected]>

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

---
  MdePkg/Library/UefiDebugLibConOut/DebugLib.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c 
b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
index f04207c93fe8..5aaf106762ea 100644
--- a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
+++ b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
@@ -69,7 +69,7 @@ DebugPrint (
    // Convert the DEBUG() message to a Unicode String
    //
    VA_START (Marker, Format);
-  UnicodeVSPrintAsciiFormat (Buffer, MAX_DEBUG_MESSAGE_LENGTH,  Format, 
Marker);
+  UnicodeVSPrintAsciiFormat (Buffer, sizeof (Buffer),  Format, Marker);
    VA_END (Marker);
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to