pxe/tftp: Remove arbitrary file size cap

This commit is contained in:
Mintsuki
2026-02-16 11:34:21 +01:00
parent 1619627d13
commit 15fa66a1a8

View File

@@ -83,12 +83,6 @@ struct file_handle *tftp_open(struct volume *part, const char *server_addr, cons
return NULL;
}
// Validate file size from TFTP server (max 1GB)
if (fsize.file_size == 0 || fsize.file_size > (1024 * 1024 * 1024)) {
print("tftp: Invalid file size from server: %u\n", fsize.file_size);
return NULL;
}
struct file_handle *handle = ext_mem_alloc(sizeof(struct file_handle));
handle->size = fsize.file_size;
@@ -230,12 +224,6 @@ struct file_handle *tftp_open(struct volume *part, const char *server_addr, cons
return NULL;
}
// Validate file size from TFTP server (max 1GB)
if (file_size == 0 || file_size > (1024 * 1024 * 1024)) {
print("tftp: Invalid file size from server: %U\n", file_size);
return NULL;
}
struct file_handle *handle = ext_mem_alloc(sizeof(struct file_handle));
handle->efi_part_handle = part->efi_handle;