summaryrefslogtreecommitdiff
path: root/httpboot.c
diff options
context:
space:
mode:
authorJan Setje-Eilers <jan.setjeeilers@oracle.com>2023-12-15 21:31:48 -0800
committerPeter Jones <pjones@redhat.com>2024-01-22 14:17:20 -0500
commita23e2f0de7a61b6e895a915676eba3a1fda2cd78 (patch)
tree061643f5c765d6e4bf4d4a01c518529c59a2cfc7 /httpboot.c
parent6f395c23466a2bc08a28bbc216d6665ade0b117d (diff)
downloadefi-boot-shim-a23e2f0de7a61b6e895a915676eba3a1fda2cd78.tar.gz
efi-boot-shim-a23e2f0de7a61b6e895a915676eba3a1fda2cd78.zip
netboot read_image() should not hardcode DEFAULT_LOADER
The netboot path up until now hardcodes DEFAULT_LOADER as the only possible filename to load. This is pretty limiting and needs to be fixed. Signed-off-by: Jan Setje-Eilers <Jan.SetjeEilers@oracle.com>
Diffstat (limited to 'httpboot.c')
-rw-r--r--httpboot.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/httpboot.c b/httpboot.c
index b34dd49c..ac9ea25c 100644
--- a/httpboot.c
+++ b/httpboot.c
@@ -719,18 +719,20 @@ error:
}
EFI_STATUS
-httpboot_fetch_buffer (EFI_HANDLE image, VOID **buffer, UINT64 *buf_size)
+httpboot_fetch_buffer (EFI_HANDLE image, VOID **buffer, UINT64 *buf_size,
+ CHAR8 *name)
{
EFI_STATUS efi_status;
EFI_HANDLE nic;
- CHAR8 next_loader[sizeof DEFAULT_LOADER_CHAR];
+ CHAR8 *next_loader;
CHAR8 *next_uri = NULL;
CHAR8 *hostname = NULL;
if (!uri)
return EFI_NOT_READY;
- translate_slashes(next_loader, DEFAULT_LOADER_CHAR);
+ next_loader = (CHAR8 *)AllocatePool((strlen(name) + 1) * sizeof (CHAR8));
+ translate_slashes(next_loader, name);
/* Create the URI for the next loader based on the original URI */
efi_status = generate_next_uri(uri, next_loader, &next_uri);