projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97ea069
)
efi_loader: do not set invalid screen mode
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Wed, 4 Sep 2019 20:46:13 +0000
(22:46 +0200)
committer
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Thu, 5 Sep 2019 21:18:51 +0000
(23:18 +0200)
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetMode() should return EFI_UNDEFINED if a
screen mode is not available.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Alexander Graf <agraf@csgraf.de>
lib/efi_loader/efi_console.c
patch
|
blob
|
history
diff --git
a/lib/efi_loader/efi_console.c
b/lib/efi_loader/efi_console.c
index 5560fc8deaa05a85ab439c6f2c4b9087b29ecd32..5109017796bd458dfcb5aa5acaee668bbf5a5c07 100644
(file)
--- a/
lib/efi_loader/efi_console.c
+++ b/
lib/efi_loader/efi_console.c
@@
-379,6
+379,10
@@
static efi_status_t EFIAPI efi_cout_set_mode(
if (mode_number >= efi_con_mode.max_mode)
return EFI_EXIT(EFI_UNSUPPORTED);
+
+ if (!efi_cout_modes[mode_number].present)
+ return EFI_EXIT(EFI_UNSUPPORTED);
+
efi_con_mode.mode = mode_number;
EFI_CALL(efi_cout_clear_screen(this));