public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/2] MdePkg/UefiDebugLibConOut: Pass the correct buffer size.
       [not found] <cover.1541422290.git.Marvin.Haeuser@outlook.com>
@ 2018-11-05 12:54 ` 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
  1 sibling, 2 replies; 5+ messages in thread
From: Marvin Häuser @ 2018-11-05 12:54 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: michael.d.kinney@intel.com, liming.gao@intel.com

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>
---
 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);
 
 
-- 
2.19.1.windows.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] MdePkg/UefiDebugLibStdErr: Pass the correct buffer size.
       [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-05 12:54 ` Marvin Häuser
  2018-11-07 17:12   ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 5+ messages in thread
From: Marvin Häuser @ 2018-11-05 12:54 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: michael.d.kinney@intel.com, liming.gao@intel.com

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>
---
 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);
 
   //
-- 
2.19.1.windows.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] MdePkg/UefiDebugLibConOut: Pass the correct buffer size.
  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é
  1 sibling, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-07 17:12 UTC (permalink / raw)
  To: Marvin Häuser, edk2-devel@lists.01.org
  Cc: michael.d.kinney@intel.com, liming.gao@intel.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);
>   
>   
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] MdePkg/UefiDebugLibStdErr: Pass the correct buffer size.
  2018-11-05 12:54 ` [PATCH 2/2] MdePkg/UefiDebugLibStdErr: " Marvin Häuser
@ 2018-11-07 17:12   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-07 17:12 UTC (permalink / raw)
  To: Marvin Häuser, edk2-devel@lists.01.org
  Cc: michael.d.kinney@intel.com, liming.gao@intel.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);
>   
>     //
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] MdePkg/UefiDebugLibConOut: Pass the correct buffer size.
  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é
  1 sibling, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-12 11:31 UTC (permalink / raw)
  To: Marvin Häuser, edk2-devel@lists.01.org
  Cc: michael.d.kinney@intel.com, liming.gao@intel.com

Hi Marvin,

I just noticed the trailing '.' in the patch subject, you should remove 
it (also in the 2nd patch).

Regards,

Phil.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-12 11:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox