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 2/2] MdePkg/UefiDebugLibStdErr: Pass the correct buffer size.
Date: Wed, 7 Nov 2018 18:12:43 +0100 [thread overview]
Message-ID: <88f787f6-5bb5-13ce-3e1a-7e223f8a1481@redhat.com> (raw)
In-Reply-To: <VI1PR0801MB17909A4F8E4AC56BCDF1ECE180CA0@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/UefiDebugLibStdErr/DebugLib.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
> index 6830a3caa1fe..837fb49b3a21 100644
> --- a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
> +++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
> @@ -71,7 +71,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);
>
> //
>
prev parent 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 1/2] MdePkg/UefiDebugLibConOut: Pass the correct buffer size Marvin Häuser
2018-11-07 17:12 ` Philippe Mathieu-Daudé
2018-11-12 11:31 ` Philippe Mathieu-Daudé
2018-11-05 12:54 ` [PATCH 2/2] MdePkg/UefiDebugLibStdErr: " Marvin Häuser
2018-11-07 17:12 ` Philippe Mathieu-Daudé [this message]
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=88f787f6-5bb5-13ce-3e1a-7e223f8a1481@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