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)
This commit is contained in:
Jan Janssen 2023-02-16 15:24:44 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent 292debc981
commit 2cf90e13f5

View File

@ -143,7 +143,7 @@ EFI_STATUS tpm_log_event(UINT32 pcrindex, EFI_PHYSICAL_ADDRESS buffer, UINTN buf
EFI_TCG *tpm1;
EFI_TCG2 *tpm2;
assert(description);
assert(description || pcrindex == UINT32_MAX);
/* PCR disabled */
if (pcrindex == UINT32_MAX)