mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-13 12:49:35 +02:00
efi/libstub: Zero initialize heap allocated struct screen_info
commitee8b8f5d83
upstream. After calling uefi interface allocate_pool to apply for memory, we should clear 0 to prevent the possibility of using random values. Signed-off-by: Qiang Ma <maqianga@uniontech.com> Cc: <stable@vger.kernel.org> # v6.6+ Fixes:732ea9db9d
("efi: libstub: Move screen_info handling to common code") Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ea4f779462
commit
f17cbe5545
|
@ -32,6 +32,8 @@ struct screen_info *__alloc_screen_info(void)
|
|||
if (status != EFI_SUCCESS)
|
||||
return NULL;
|
||||
|
||||
memset(si, 0, sizeof(*si));
|
||||
|
||||
status = efi_bs_call(install_configuration_table,
|
||||
&screen_info_guid, si);
|
||||
if (status == EFI_SUCCESS)
|
||||
|
|
Loading…
Reference in New Issue
Block a user