1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-26 08:55:18 +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)
This commit is contained in:
Jan Janssen 2023-02-16 15:24:44 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent 7c9b9c8d93
commit ac3d8922df

View File

@ -146,7 +146,7 @@ EFI_STATUS tpm_log_event(uint32_t pcrindex, EFI_PHYSICAL_ADDRESS buffer, UINTN b
EFI_TCG2 *tpm2;
EFI_STATUS err;
assert(description);
assert(description || pcrindex == UINT32_MAX);
/* If EFI_SUCCESS is returned, will initialize ret_measured to true if we actually measured
* something, or false if measurement was turned off. */