tianocore / edk2

EDK II
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II
Other
4.38k stars 2.4k forks source link

SecurityPkg/Tcg2Acpi: Remove debug print #5868

Open makubacki opened 5 days ago

makubacki commented 5 days ago

Description

This debug print may attempt to print a string without a null terminator that can lead to a machine check.

How This Was Tested

Integration Instructions

jyao1 commented 4 days ago

If the concern is not NUL-terminated string, can we print each char by using %c ?

Or enlarge the CHAR8 Hid[TPM_HID_ACPI_SIZE + 1]; to hold final NUL, and DEBUG ((DEBUG_INFO, "TPM2 ACPI _HID is patched to %a\n", Hid));

I still wish we can print the final patched string, to help debug potential issues.