audk/ShellPkg
Giri Mudusuru 0b37723186 ShellPkg/UefiShellDebug1CommandsLib: Replace hardcoded SMBIOS strings.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3805

Replace hardcoded SMBIOS Anchor string and size with defines.

Fix buffer overflow as described below.

Smbios64BitPrintEPSInfo () is coded like:
UINT8  Anchor[5];

MemToString (Anchor, SmbiosTable->AnchorString, 5);

But the definition of MemToString()
  Copy Length of Src buffer to Dest buffer,
  add a NULL termination to Dest buffer.

So Anchor needs to be +1 the size of the SMBIOS Anchor string `_SM3_`.

Changes from v1 to v2:
 - Replace doxygen style inline comments

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Andrew Fish <afish@apple.com>
Signed-off-by: Giri Mudusuru <girim@apple.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2023-05-12 05:09:14 +00:00
..
Application ShellPkg: Fix conditionally uninitialized variables 2023-04-03 15:29:08 +00:00
DynamicCommand ShellPkg/DpDynamicCommand: Add ResetEnd support in DP command 2022-11-29 04:23:39 +00:00
Include ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Library ShellPkg/UefiShellDebug1CommandsLib: Replace hardcoded SMBIOS strings. 2023-05-12 05:09:14 +00:00
ShellPkg.ci.yaml ShellPkg: Update YAML to ignore specific ECC files/errors 2021-11-30 14:19:07 +00:00
ShellPkg.dec ShellPkg: Export default shell delay as PCD 2023-01-20 16:43:51 +00:00
ShellPkg.dsc ShellPkg: Add LOONGARCH64 architecture for EDK2 CI. 2022-10-14 02:16:33 +00:00