
2 Sep
2022
2 Sep
'22
12:06 a.m.
We cannot expect the buffers passed to the input protocols to be zero filled. If only modifier keys are pressed, we have to return EFI_NOT_READY but we still have to fill the key structure.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- lib/efi_loader/efi_console.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index 3164fd484e..1fcaabe1c4 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -987,6 +987,7 @@ static efi_status_t EFIAPI efi_cin_read_key_stroke_ex( efi_cin_check();
if (!key_available) { + memset(key_data, 0, sizeof(struct efi_key_data)); ret = EFI_NOT_READY; goto out; }
--
2.37.2