diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-09-01 23:30:09 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-09-03 08:16:09 +0200 |
commit | 0b7b56d7d7446ab24d2b8da2236ec44ea7edf2cc (patch) | |
tree | f99887368324e898fab22bb836f9cff6e962cbba /lib | |
parent | a641e36fdbf09a6db046e9afe7531e9c623e70d3 (diff) | |
download | u-boot-0b7b56d7d7446ab24d2b8da2236ec44ea7edf2cc.zip u-boot-0b7b56d7d7446ab24d2b8da2236ec44ea7edf2cc.tar.gz u-boot-0b7b56d7d7446ab24d2b8da2236ec44ea7edf2cc.tar.bz2 |
efi_loader: compliance Simple Text Input Ex Protocol
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>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_console.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index 3164fd4..1fcaabe 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; } |