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
This commit is contained in:
Jan Janssen 2023-02-16 15:24:44 +01:00 committed by Yu Watanabe
parent 2d5ccb0818
commit f92428eae5

View File

@ -146,7 +146,7 @@ EFI_STATUS tpm_log_event(uint32_t pcrindex, EFI_PHYSICAL_ADDRESS buffer, size_t
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. */