mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
efi_loader: Fix potential deref-after-null
After having been compared to a NULL value at efi_disk.c:426, pointer 'part_info' is dereferenced at efi_disk.c:534. Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
87ef1987de
commit
80908fee77
@ -531,7 +531,8 @@ static efi_status_t efi_disk_add_dev(
|
|||||||
|
|
||||||
/* Store first EFI system partition */
|
/* Store first EFI system partition */
|
||||||
if (part && efi_system_partition.uclass_id == UCLASS_INVALID) {
|
if (part && efi_system_partition.uclass_id == UCLASS_INVALID) {
|
||||||
if (part_info->bootable & PART_EFI_SYSTEM_PARTITION) {
|
if (part_info &&
|
||||||
|
part_info->bootable & PART_EFI_SYSTEM_PARTITION) {
|
||||||
efi_system_partition.uclass_id = desc->uclass_id;
|
efi_system_partition.uclass_id = desc->uclass_id;
|
||||||
efi_system_partition.devnum = desc->devnum;
|
efi_system_partition.devnum = desc->devnum;
|
||||||
efi_system_partition.part = part;
|
efi_system_partition.part = part;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user