public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Marvin Häuser" <Marvin.Haeuser@outlook.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "michael.d.kinney@intel.com" <michael.d.kinney@intel.com>,
	"liming.gao@intel.com" <liming.gao@intel.com>
Subject: Re: [PATCH 1/2] MdePkg/UefiDebugLibConOut: Pass the correct buffer size.
Date: Wed, 7 Nov 2018 18:12:23 +0100	[thread overview]
Message-ID: <80242a9e-df9a-2a41-35f3-c9c020eb1164@redhat.com> (raw)
In-Reply-To: <VI1PR0801MB179075DEC69E47E1F2E7A47B80CA0@VI1PR0801MB1790.eurprd08.prod.outlook.com>

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 <Marvin.Haeuser@outlook.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>   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);
>   
>   
> 


  reply	other threads:[~2018-11-07 17:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1541422290.git.Marvin.Haeuser@outlook.com>
2018-11-05 12:54 ` [PATCH 2/2] MdePkg/UefiDebugLibStdErr: Pass the correct buffer size Marvin Häuser
2018-11-07 17:12   ` Philippe Mathieu-Daudé
2018-11-05 12:54 ` [PATCH 1/2] MdePkg/UefiDebugLibConOut: " Marvin Häuser
2018-11-07 17:12   ` Philippe Mathieu-Daudé [this message]
2018-11-12 11:31   ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80242a9e-df9a-2a41-35f3-c9c020eb1164@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox