projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
efi_loader: QueryMode() must allocate buffer
[platform/kernel/u-boot.git]
/
lib
/
efi_loader
/
efi_gop.c
diff --git
a/lib/efi_loader/efi_gop.c
b/lib/efi_loader/efi_gop.c
index
676463f
..
2385c0f
100644
(file)
--- a/
lib/efi_loader/efi_gop.c
+++ b/
lib/efi_loader/efi_gop.c
@@
-51,8
+51,12
@@
static efi_status_t EFIAPI gop_query_mode(struct efi_gop *this, u32 mode_number,
}
gopobj = container_of(this, struct efi_gop_obj, ops);
}
gopobj = container_of(this, struct efi_gop_obj, ops);
+ ret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, sizeof(gopobj->info),
+ (void **)info);
+ if (ret != EFI_SUCCESS)
+ goto out;
*size_of_info = sizeof(gopobj->info);
*size_of_info = sizeof(gopobj->info);
-
*info = &gopobj->info
;
+
memcpy(*info, &gopobj->info, sizeof(gopobj->info))
;
out:
return EFI_EXIT(ret);
out:
return EFI_EXIT(ret);