From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: devel@edk2.groups.io, rebecca@bsdio.com
Cc: Ray Ni <ray.ni@intel.com>, Zhichao Gao <zhichao.gao@intel.com>
Subject: Re: [edk2-devel] [PATCH] ShellPkg: smbiosview - print field values as unsigned integers
Date: Mon, 27 Apr 2020 10:54:46 +0200 [thread overview]
Message-ID: <433dcd98-cbb6-8914-ea9d-1c76f5e73017@redhat.com> (raw)
In-Reply-To: <20200424225555.187831-1-rebecca@bsdio.com>
Hi Rebecca,
On 4/25/20 12:55 AM, Rebecca Cran wrote:
> This prevents overflow when printing DWORD fields such as the type 17
> tables's extended DIMM size.
Similar issue with type 14:
ShellPrintEx(-1,-1,L"ItemType %d: %d\n", Index + 1,
Struct->Type14->Group[Index].ItemType);
ShellPrintEx(-1,-1,L"ItemHandle %d: %d\n", Index + 1,
Struct->Type14->Group[Index].ItemHandle);
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
> .../Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> index a75caff3de..be8b7c0a97 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> @@ -49,7 +49,7 @@
> #define PRINT_STRUCT_VALUE(pStruct, type, element) \
> do { \
> ShellPrintEx(-1,-1,L"%a",#element); \
> - ShellPrintEx(-1,-1,L": %d\n", (pStruct->type->element)); \
> + ShellPrintEx(-1,-1,L": %u\n", (pStruct->type->element)); \
> } while (0);
>
> #define PRINT_STRUCT_VALUE_H(pStruct, type, element) \
>
prev parent reply other threads:[~2020-04-27 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 22:55 [PATCH] ShellPkg: smbiosview - print field values as unsigned integers Rebecca Cran
2020-04-27 8:54 ` 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=433dcd98-cbb6-8914-ea9d-1c76f5e73017@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