diff options
author | Giri Mudusuru <girim@apple.com> | 2023-05-06 18:28:24 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-05-12 05:09:14 +0000 |
commit | 0b37723186ec1525b6caf14b0309fb0ed04084d7 (patch) | |
tree | dfde237f0ed115bc2e5615641b529c5961a36f6e /License-History.txt | |
parent | 2d4c76f783ee7eaab65b64f2f8c04f78394be0d1 (diff) | |
download | edk2-0b37723186ec1525b6caf14b0309fb0ed04084d7.tar.gz edk2-0b37723186ec1525b6caf14b0309fb0ed04084d7.tar.bz2 edk2-0b37723186ec1525b6caf14b0309fb0ed04084d7.zip |
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>
Diffstat (limited to 'License-History.txt')
0 files changed, 0 insertions, 0 deletions