1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-21 09:33:57 +03:00

boot: Fix assertion failure

The TPM code expects a description unless the PCR index indicates that
no measurements have to take place. The assert was preempting this
check from happening.

Fixes: #26428
(cherry picked from commit f92428eae5)
(cherry picked from commit cd5de2811a)
(cherry picked from commit ac3d8922df)
(cherry picked from commit 2cf90e13f5)
This commit is contained in:
Jan Janssen 2023-02-16 15:24:44 +01:00 committed by Luca Boccassi
parent 8e8c7d5114
commit 8a9b918e17

View File

@ -139,7 +139,7 @@ EFI_STATUS tpm_log_event(UINT32 pcrindex, const EFI_PHYSICAL_ADDRESS buffer, UIN
EFI_TCG *tpm1;
EFI_TCG2 *tpm2;
assert(description);
assert(description || pcrindex == UINT32_MAX);
tpm2 = tcg2_interface_check();
if (tpm2)