summaryrefslogtreecommitdiff
path: root/netboot.c
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@canonical.com>2013-09-20 11:29:23 -0500
committerPeter Jones <pjones@redhat.com>2013-09-24 12:05:21 -0400
commitd98242e3c5bcb3cdc88f422dcbf64294a3db1a7e (patch)
treee28202019833662e271df8415a248610439ebf25 /netboot.c
parentf4ce20cca924d6ff6d6b0c32266ec2d4329a0e29 (diff)
downloadefi-boot-shim-d98242e3c5bcb3cdc88f422dcbf64294a3db1a7e.tar.gz
efi-boot-shim-d98242e3c5bcb3cdc88f422dcbf64294a3db1a7e.zip
Pass the right arguments to EFI_PXE_BASE_CODE_TFTP_READ_FILE
A wrong pointer was being passed to EFI_PXE_BASE_CODE_TFTP_READ_FILE, preventing us from getting the file size back from the tftp call, ensuring that we don't have enough information to properly secureboot-validate the retrieved image.
Diffstat (limited to 'netboot.c')
-rw-r--r--netboot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/netboot.c b/netboot.c
index c44aeac5..66300d6d 100644
--- a/netboot.c
+++ b/netboot.c
@@ -326,7 +326,7 @@ EFI_STATUS parseNetbootinfo(EFI_HANDLE image_handle)
return rc;
}
-EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle, VOID **buffer, UINTN *bufsiz)
+EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle, VOID **buffer, UINT64 *bufsiz)
{
EFI_STATUS rc;
EFI_PXE_BASE_CODE_TFTP_OPCODE read = EFI_PXE_BASE_CODE_TFTP_READ_FILE;
@@ -344,7 +344,7 @@ EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle, VOID **buffer, UINTN *bufs
try_again:
rc = uefi_call_wrapper(pxe->Mtftp, 10, pxe, read, *buffer, overwrite,
- &bufsiz, &blksz, &tftp_addr, full_path, NULL, nobuffer);
+ bufsiz, &blksz, &tftp_addr, full_path, NULL, nobuffer);
if (rc == EFI_BUFFER_TOO_SMALL) {
/* try again, doubling buf size */